devolution

Author Topic: General Discussion  (Read 3821877 times)

0 Members and 15 Guests are viewing this topic.

Offline MrKlaus

  • Full Member
  • ***
  • Posts: 144
Re: General Discussion
« Reply #3030 on: August 01, 2014, 12:21:51 PM »
Really? I could have coded that in under 4 hours if someone provided graphics/texts and concept + my version would have been easier to expand
Sounded like a pro.  8)


 Quick question. Is there a possibility to code a snowball hit effect on the screen without any other external graphics, just with the stuff that RenPy provides? I’m asking because I want the MC to be hit with a snowball when he comes to the Alignment temple. If the answer is no or it’s too much work I will change the beginning.
 

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #3031 on: August 01, 2014, 12:31:59 PM »
What is a "snowball hit effect"?
Like what we're doing?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #3032 on: August 01, 2014, 01:05:49 PM »
@Dark:

How are items auto-buy/auto-equipment system supposed to work? (I am asking you as items designer).

I am having a bit of a trouble following the design, for example items like health potions seem to have 50 equipment chance and badness of 70 - 90 while they have absolutely no sideeffects?

For now, I'll give up on med-kits idea and just code use of basic potions during exploration so we don't overcomplicate things.
Like what we're doing?

Offline MrKlaus

  • Full Member
  • ***
  • Posts: 144
Re: General Discussion
« Reply #3033 on: August 01, 2014, 01:07:25 PM »
What is a "snowball hit effect"?

Long story short. MC enter the are and gets hit with a snowball in the face.  I want that to be visualized by a splash/hit effect on the screen. Something like a snowball hitting a window or a camera. 
 
« Last Edit: August 01, 2014, 01:12:16 PM by MrKlaus »

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #3034 on: August 01, 2014, 01:20:46 PM »
Long story short. MC enter the are and gets hit with a snowball in the face.  I want that to be visualized by a splash/hit effect on the screen. Something like a snowball hitting a window or a camera.

It might be possible to shake the screen and go to some form of a white-out transition with supporting texts like:

"Before you knew what happened" --> shake --> effect --> "Snowball hits ya in the mug".

If you want an actual snowball to hit, graphic would be required, but those shouldn't be hard to find.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #3035 on: August 01, 2014, 02:44:30 PM »
I am having a bit of a trouble following the design, for example items like health potions seem to have 50 equipment chance and badness of 70 - 90 while they have absolutely no sideeffects?
Under normal circumstances badness 90 shows that they could buy it just in case. Because under normal circumstances you don't really need to buy or use healing potions. Moreover, you cannot express the need for them via badness and eqchance only.

These numbers also show relative chance and badness. Small potion has 90/50 while medium has 85/45. Thus, they would prefer to buy stronger one and to use weaker one first when they are wounded.

Items also have type. All mana and health potions are restore type. Thus, when a girl lacks hp or mp, she begins to search for restore items regardless of their absolute badness value.
Types could be improved to help AI if you don't want to analyze items properties in the code, like health_restore, mp_restore, etc.

The same logic applies to any other item. First, the girl decides what she wants in general (potion, makeup, weapon, dress) depending on occupation, current stats, traits, gold, mood, rng, inventory (if she has an item or not). Then she begins to inspect shops.

She still could buy any random item if she has enough gold. Like a small potion with 10% chance, even if she is not wounded. But if she is wonded, it will be 100% if there is no other healing items.

At least this is the concept I used so far.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #3036 on: August 01, 2014, 02:52:33 PM »
We need to straiten this out, maybe simplify the process/concept. I got distracted on geometry code again, need to kick myself and start working on the immediate stuff.

I am having trouble with items that can increase one stat but mess up a whole bunch of others... it would be prolly best to exclude items like that from the auto-buy/auto-equip all together.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #3037 on: August 01, 2014, 03:03:32 PM »
As I said, you cannot express the need for every item via badness and eqchance. If we'll set badness and eqchance for healing potions to 0/100 and everyone will begin to buy and drink them like there's no tomorrow, it won't helps us at all.

Also, items with permanent type should not be used by girls without the participation of the player.
« Last Edit: August 01, 2014, 03:10:53 PM by DarkTl »

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #3038 on: August 01, 2014, 05:19:19 PM »
I fecking hate writing code like this, we will NEVER complicate any system without a GREAT deal of added benefit again.

First:
Get the proper items based on the stats/slot required.

Second:
Exclude all items that diminish stats relevant to whatever the statbase in use.

Third:
Check the badtraits.

Fourth:
Check "permenate" type.

Fifth:
Check side-effects (like Poison).

Six:
Check goodtraits and eqchance.

Seventh:
Check if using the item is sensible (wasteful) and find some way to determine what the f*ck sensible is when auto-equipping items.

Eight:
Make sure the extensive sorting/calculation required don't slow down the game on the next day significantly.

I have no idea how to put this in the right order, how to sort the items and how/when to pick the correct one. There is also a question on what to do with items that offer significant benefits to for example attack but lower magic, both are battle stats and under the checks above, this will malfunction very often.

We either need a simplified system guided by JSON or a decent approach I haven't thought of yet. This is eating up too much time.
==================================================
Edit:
Got really pissed and ended up deleting most of the code that I wrote. Tomorrow morning I'll try and implement auto-buy/auto-equipment system with controlled inventories as we discussed about an year ago. Not going to do anything else for the game tonight.
« Last Edit: August 01, 2014, 05:47:39 PM by Xela »
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #3039 on: August 02, 2014, 06:32:40 AM »
First, let's divide autobuy and autoequipment sustems. If you bought some item irl, it doesn't mean that you desperately need it right now, and it doesn't even mean that you will use it at all.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1) Items with permanent type are ignored completely by both systems. And only when MC tells the girl (with high disposition/love) to use it, it will be used.
2) Restore items. When something is wrong (low health, bad status), they have the highest priority. AE system uses them on spot, AB system looks for them and buys if has enough gold.
3) Food, basically weak and cheap restore items when health/mp/whatever is not too low and/or potions are not available. Girls should avoid to use too many food because of food poisoning.
4) Upgrade items are not necessary. They might have an advanced algorithm for AB/AE systems, but they also might as well be almost random, because there will be dozens of new upgrade items in the future when I'll expand items system, so it probably not worth it. I could add something like goodoccupation/badoccupation to them if you want. It probably will simplify the situation.
----------------------------------------------------------------------------------------------------------------------------------------------
Misc items can be restore, upgrade and permanent types as well. Nothing new here for AB, as for AE, it probably should change the equipped item depending on circumstances. Again, I could add  goodoccupation/badoccupation here.
----------------------------------------------------------------------------------------------------------------------------------------------
Weapons can be small and normal. Like in wm, whores, servicegirls, strippers cannot use normal ones without penalties to performance. They also have types (like rod, bow or scythe) that mostly should be used for BE. But we also can add something like favorite weapon type to girls data files, it will make sense in many cases.
----------------------------------------------------------------------------------------------------------------------------------------------
Rings and amulets do not have types. All other items have 3 types: armor, dress and other. Obviously, armor is useful if a girl wants protection (warriors, also normal girls if security is vey low for a long time), dress is for nonwarrior occupations, other is something that player should buy and equip manually.
----------------------------------------------------------------------------------------------------------------------------------------------

Now, how I see AB system. Let's not make it too smart first of all, because irl people are not that smart either.
Except for restore items, it should be heavily based on rng. First, a girl randomly chooses a slot. Then depending on rng, available gold, badness and good/bad traits, she randomly buys an item. That being said, if she already has some item in her inventory, then the chance to buy it again is four times less, but it still exists.

Girls also should not buy items too often. Maybe once per week or once per 500 gold income.

----------------------------------------------------------------------------------------------------------------------------------------------
How I see AE system.
1) Warriors prefer armor, others prefer dress, even if they bought something else. Unless MC tells them to wear something else.
2) Restore and permanent items I already mentioned. Upgrades should be mostly random as well, because there are too many various cases.
3) Eqchance is the priority here. Better items have both higher price and higher eqchance.
----------------------------------------------------------------------------------------------------------------------------------------------
That's it. I can't really code this instead of you, so choose what you like. In my opinion, this is the best compromise between 100% random like in wm and advanced AI
algorithms.
« Last Edit: August 02, 2014, 06:36:02 AM by DarkTl »

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #3040 on: August 02, 2014, 06:49:34 AM »
That's it. I can't really code this instead of you, so choose what you like. In my opinion, this is the best compromise between 100% random like in wm and advanced AI[/color] algorithms.

Yeah,  I understand that, the trouble is that there are too many variations and too many things to watch out as I've wrote in previous post. What you propose are generalizations, I still don't know how the item picking process should go...

Anyway, I've recoded Inventory class completely, also did some work on slightly improving outdated equipment screens. I'll try my second attempt at ab/ae soon.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #3041 on: August 02, 2014, 07:06:29 AM »
For non restore ones
1) choose random slot
2) check for gold, exclude too expensive items
3) goodtrait = 100% chance, badtrait = 0%, otherwise buychance=100-badness. if item already exists in the inventory then buychance = buychance/4. Maybe good occupation +50%, badoccupation -50%.
4) prepare list of items like dress1:chance1, dress2:chance2, for rng.
5) rng. maybe there could be 40% chance to buy 2 different items.
6) AE system decides what to do next
« Last Edit: August 02, 2014, 07:09:30 AM by DarkTl »

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #3042 on: August 02, 2014, 07:45:24 AM »
SF Updated:
- Fixes slaves being paid not reporting to next day
- Completely rewrote Inventory class, should be up to 3 times faster, code is also shorter and better readable
- Fixed NextDay SE report crashing on a bad bracket
- Improved some items/shops related screens
- Rewrote auto-animations function (faster + better code)
- Fixed girls profile screen crashing after returning from the next day
- Added one more text style

For non restore ones
1) choose random slot
2) check for gold, exclude too expensive items
3) goodtrait = 100% chance, badtrait = 0%, otherwise buychance=100-badness. if item already exists in the inventory then buychance = buychance/4. Maybe good occupation +50%, badoccupation -50%.
4) prepare list of items like dress1:chance1, dress2:chance2, for rng.
5) rng. maybe there could be 40% chance to buy 2 different items.
6) AE system decides what to do next

All this time I was taking about AE :)

Anyway, I'm going to try my old approach again (stats-based). If that turns into gibberish again, I'll try to find a way to simplify.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #3043 on: August 02, 2014, 08:57:33 AM »
Ok, how would I code AE if I was a pyhton coder  :D
1) Restore items and food used on spot whan needed to restore something. There could be a very small chance of using too many food -> food poisoning. Items with higher eqchance are used in the first place.
2) Warriors use big and small weapons, others only snall ones. I also kinda like the idea of adding favorite weapon type to girls data files, many characters have it. Wihout advanced BE other things don't matter right now, except badness. The less the badness, the more the priority of the weapon. Good/bad traits reduce/increase it, let's say, by 20.
3) Armor/dress/other. Armor for warriors, dress for others. Also, maybe low security leads to armor on non warrior characters, but that probably will only make things too complicated. Other type items could be bought randomly, but only MC can force them to equip it. Again, items with higher eqchance have higher priority.
4) Rings/amulets. Probably good place for goodoccupation/badoccupation, if you want to use it. Other than that, pure random.
5) Upgrade concumables. As far as I understand, you want something advanced here. I'd say we could use goodoccupation plus pure random based on eqchance when occupation is not good.
« Last Edit: August 02, 2014, 09:03:32 AM by DarkTl »

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #3044 on: August 02, 2014, 09:07:57 AM »
...

Lets call it an simplified version :)

There are too many variables where this would lead to bs... I am working off a different angle.
Like what we're doing?