Question about a PW scene .

Users who are viewing this thread

If you select a buyable object in the PW scene editor you will see Var1 and Var2.
Var1 does the faction + price (multiplier)
Var2 does the stockpile, enter "50" in to there for instance to get 25 stockpile on mission start.
 
chunky_monkeh said:
Var2 does the stockpile, enter "50" in to there for instance to get 25 stockpile on mission start.

Aren't you a server owner? You should know better  :roll:

//Noticed that I wrote way too much for such a simple question, so here's a tl;dr version of where I disagree with you.
What the value 50 does for the stockpile: A stockpile limit of 500. Nothing else.
What will it do on pw_buy probs? A target stock count of 50. This does NOT mean that it gets an initial stock count of 25.  However, the initial target stock count is calculated as a percentage of the target stock count. That percentage is set by the server for all stockpiles and pw_buy props at once. If this percentage happens to be 50 and the target stock count happens to be 50, then the pw_buy prop will start with an initial stock count of 25. To get the same effect on a stockpile (pw_stockpile), you'd need to set the var2 to x5 (x is any number, as it represents the stockpile limit and 5 represents a target stock count of 50).

_____

To explain all the options in more depth: (edited to make the names less awkward)

As a first step you'll want to differentiate between resource stockpiles (pw_stockpile) and item stockpiles (pw_buy). While resource stockpiles buy and sell resources, item stockpiles are used to craft, buy and sell items (armour, weapons etc.) - Exceptions are bolts and arrows, which do only sell items. Following is an explanation of the 2 values which enable you to change things like prices, limits and crafting options for the stockpiles.

There are 2 options forming var1 (the first value of the stockpile).

First of you have the faction, this is pretty easy. The values 0-9 represent the different castles - 0 and 1 being commoners and outlaws and 2-9 castles. While 0 and 1 won't have any effect on the game, setting it to 2-9 will generate 20% of the buying price in the money chest of that castle for every purchase. You'll probably want to link most stockpiles to a castle.

Then you have the price multiplier. When you press F2 and scroll down, you'll find a list of numbers and percentages. These represent the price multipliers. While 0x (x represents the faction value) is the default price, it ranges from 20% of this default price (1x) to up to 1000% (12x). Beware though: Mostly you'll need to reload the scene (restarting) if you want to see the actual price in the editor.

To form var1 you'll simply combine these two numbers - for example 75 will set the price of the stockpile to 160% of the default price and 20% of that price will go to the money chest of castle 4.


We'll continue with var2 (the second value). This is where resource stockpiles are different from item stockpiles.  For the resource stockpiles there are 2 options to change here.

First of there is the target stock count. In most cases this is left at zero. However, it is pretty useful: you can give it a value ranging from 1 to 9, which will then set the target stock count to 10-90 (depending on the value). Now what is the target stock count for stockpiles? If there's none you'll always sell resources 20% cheaper than the buying price. However, if there is a target stock count and it is not reached yet, you'll get more for your resources; If the actual stock count reaches zero you'll even get the whole buying price for your first sold resource piece. Awesome! :grin:
However, there's seldomly any effect on the economy (if you can call it an economy in PW nowadays), that's why it's mostly not used.

Then there is the stockpile limit. This is often used to limit the selling of easily obtainable resources.
You can set it to 1x-12x (where x represents the target stock count value). 1x means a stockpile limit of 100 and 12x means a stockpile limit of 1200. Anything inbetween should be clear. 0x means that there is no limit.

Again, to form var2 you'll want to combine these 2 numbers. Example: 38 means that there's a stockpile limit of 300 and a target stock count of 80.

_____

Now, I did mention a difference between resource stockpiles and item stockpiles. While they are the same for var1, var2 is a bit different:

Resource stockpiles have the option to set a limit and a target stock count.
Item stockpiles do only have the option to set the target stock count on var2; There is no limit to how many items an item stockpile can hold. In addition, instead of having an effect on the selling price, the target stock count influences the crafting reward for item stockpiles.

A little explanation:
var2 of item stockpiles can be set to any value between 0 and 127. This then represents a target stock count of 0 to 127. While it has no impact on the price of the item (in comparison to the resource stockpiles), it is the only modifier for the "curve" of the crafting reward.
What is the crafting reward? Well, when you look at an item stockpile on an actual server, you'll notice 2 things: Crafting refund and crafting reward. It is crucial to be able to differentiate between these two names.
While the crafting refund is set in stone [outdated for PW4.5, see below**] for every item and represents the default prices of the materials used in crafting (hence called a refund), the reward can be seen as a bonus for the smith and the main income for him. The maximal crafting reward is calculated by a few other values. I don't know the exact formula, but the price and the skill required to craft the item play a part in it. *See post below! That means you can influence this reward by changing the price with var1.
Now why is it the maximal crafting reward? This works similar to the selling price and the target stock count for stockpiles, except that instead of going from the buying price (stockpile count of zero) to 80% of that (stockpile count equal or greater than target stock count), the crafting reward will start at the maximal crafting reward (stock count of zero) and go down to zero (stock count equal or greater than the target stock count). That means if there's no target stock count, there's also no crafting reward and crafting does only yield the crafting refund;  - setting the target stock count correctly is thereby very important.
Vornnes Scene creating guide gives very good suggestions on where to put the target stock count for item stockpiles.

Now what does chunky_monkeh mean with that thing on mission start and stocks starting with stuff?
It actually doesn't work the way he explained it. You see, there's no such value or number representing the "initial" stock/stockpile count (stock count on mission start).
However - Every server does have a config file. In this there are many options, including one where you can change the initial stock/stockpile count in relation to the target stock count. That's one value for all of the item and resource stockpiles. If you set that value to 50, all the item and resource stockpiles will have an initial stock count of 50% of their target stock count - if that target stock count happens to be 50, then it's 25 as initial stock count.
In this setting there's also another reason for resource stockpiles seldomly using a target stock count: While you want to have item stockpiles start with an initial stock count, this is not desired for resource stockpiles, as people want the "fresh" feeling of unused castles and having to build up resources after a restart. If you give the resource stockpiles a target stock count, they will also have an initial stock count if the server doesn't set its percentage to zero.


**You can now change the crafting refund with PW4.5. Use the PW_local_xx_price_area. Guessing here: var1 is the multiplier as you know it. So any craftable item in the area of the price modifier will have its refund affected for the respective type of the price modifier (resource types).
What happens when 2 areas meet? I don't know yet, will test.
var2 is there to scale the size of the price modifier area. I have no clue how it works yet.
The purpose of this price modifier is to allow the mapper to control the refund, as there are different resource prices on the map - e.g. in a village where you can produce linen for 44 or 88 gold, previously it was much more effective to simply craft a simple dress (you could often see these in a village) which yielded you the default price of linen (220), resulting in hundreds of pointless dresses. On the other side leather and wood prices were often high enough to discourage any smith to craft low-tier stuff with these resources (e.g. saddles).
 
That's a very detailed explanation of stockpile scene prop values, Pendanyk: I have added a link to the bottom of the sticky scene creating guide post, for future reference of the (unfortunately) few people that read guides.
Pendanyk said:
The maximal crafting reward is calculated by a few other values. I don't know the exact formula, but the price and the skill required to craft the item play a part in it.
The exact formula in PW 4.4 is:
Code:
(crafted item price * 0.20 + average crafting skill level required * 300) * inverse of percentage current stock count is of target stock count
The average skill level means if the item requires either 2 engineering or 3 tailoring, the factor will be 3 * 300 (the average is rounded up). The inverse percentage of target stock count means that the full extra reward is given when stock is at 0, scaling back to no extra reward when the stock count meets the target: as Pendanyk also explained above.
 
chunky_monkeh said:
If you select a buyable object in the PW scene editor you will see Var1 and Var2.
Var1 does the faction + price (multiplier)
Var2 does the stockpile, enter "50" in to there for instance to get 25 stockpile on mission start.
ok I'll read your answers  :???:
 
Back
Top Bottom