Topic: Creating wares tutorial
Ex-Member Topic Opener |
Posted at: 2009-04-23, 20:28
Hi, Note this tutorial is for trunk, this means that some things are not implemented in build13. (but it's ok for build14) This tutorial describes how to create wares and what options exist. So... A conf file, with all the possibilities looks kind of this:
Now let's describe every option:
Description displayed in ware encyclopedia. It must have an leading underscore (_)
As the name suggests, the default target quantity for a ware. This is the default wanted number of wares in the warehouse/headquarters. This is not required for basic wares.
This is not required as well. It'll tell the AI how important the ware is. I'm unsure whether 1 is the most or least important. This option is only for AI and used by AI.
This section is a must-be in the file. No description is required for that.
What image will be displayed. Usually it is called idle.png and is of size like 16x24.
It tells where the picture should be drawn in the location in question (ie. node). For example the value can be 9 11 (that's the very pixel that'll be drawn in the location). This is all about the ware's conf file. Now there need to be 2 more files in the folder. First is the one defined in "pics" and the second one must be named menu.png. It will be displayed in warehouse/headquarters. So let's have a look at a conf file of an axe for example:
(broke the line in half) and its folder contents:
That's probably how you're folder's contents will look. The last step is to add info about it in 'conf' in the main tribe's directory. Add a line pointing to the directory in manner of other folders. So for example if the name is lightaxe, it'll look like that:
Place it under '[ware types]' section in alphabetical order. I think it describes it all quite enough. I hope it helps somebody. -- Regards, Soeb Edited: 2009-10-06, 17:07
Top Quote |
Astuur |
Posted at: 2009-04-25, 13:42
For all those that read Soeb's post above at a later time, I want to clarify, that the ware's description he used as an example:
is partly no more true. Barbarian lumberjacks now have a different tool (felling axe) for their work. Just to avoid any confusion._ Thanks Soeb! I want to add a thing or two: Default_Target_quantity=: This option exists to compensate for possibly adverse effects of the "on-demand" production system. This describes how many of these wares should be kept in store as a minimum. If, for example, you would need to build 4 new lumberjack huts, you normally would not have 4 axes in store (if default =1). So you'd have to wait for their production. It you set the default to 5, that's what you will always have. You can set the option in the ware's conf file so it will be valid until you change it. In addition you can adjust the value inside the game using the flags menu. These adjustments are only relevant for this particular game. Setting this option only makes sense for wares that are conrtrolled by the On-demand feature. Basic wares like trunks, corn, water, granite and reet are always produced at full rate stored in what quantities they may come. Some other wares that do not have a choice of further processing (like the ores) also do not need a Default_target_quantity. Apart from that, I am not sure what the new "preciousness=" statement is really used for. Maybe this is more for the benfit of the AI, or perhaps for the distrubution between different warehouses? Edited: 2011-08-24, 06:35
Being no programmer, I apologize for all my suggestions that imply undue workload and for other misjudgements due to lack of expertise or relevant skills. |
Ex-Member Topic Opener |
Posted at: 2009-04-25, 13:57
Happy to hear you like it! I'll edit the post to make the description descriptive.
It is only for AI. It tells how important the ware is (this does not matter for basic wares) and if it should try to get this. But I'm not completely sure how it works, just that only AI needs it. @EDIT: Updated, thanks for the tip Astuur. Edited: 2009-04-25, 14:04
Top Quote |