Hi Folks,
I uploaded the module system for version 0.731 on our server. You can grab it from the link below:
www.taleworlds.com/download/mb_module_system_0731_0.zip
Some of the many changes include:
Added pf_no_label flag to parties which makes a party not display a label (Thanks to Thorgrim for suggesting this!)
Added store_random_in_range and store_attribute_level commands. Thanks a lot to Khalid Ibn Valid and Winter for their suggestions.
New module file: scene_props.txt you need to copy this over to your module.
New module file: particle_systems.txt you need to copy this over to your module.
New module file: sounds.txt you need to copy this over to your module.
New module file: simple_triggers.txt you need to copy this over to your module.
There is no limit on number of variables anymore.
Changed map_icons file format. The new format requires id and flags fields.
Added scan_module_sounds directive.
You must add the following lines to module_info.txt
Also there have been lots of changes to mission_templates, so I suggest you use the official version for this.
One of the most powerful new features intrroduced in the new version is the abillity to attach pieces of data to game objects. The attachments are called "slots". You can put any number inside them. For example troop_set_slot and troop_get_slot commands let you attach and retrieve data to troop objects. Suppose you want to keep track of which NPCs the player has met with. Let's assume you decide that, say the seventh slot will hold "1" if player has spoken to an NPC and "0" otherwise (all slots are initially set to 0) . Then whenever we speak to an NPC you'll set the seventh slot with
Then whenever we want to check if we have talked with this NPC before, we may use:
There is no practical limiti to the number of slots you can use, but note that if you assign to a slot 10000, all slots from 0 to 10000 will be created. So try to use the slots with lowr numbers.
I guess that's it for now. I hope you won't have too much trouble porting existing mods. I'll be around if you need to ask any questions.
I uploaded the module system for version 0.731 on our server. You can grab it from the link below:
www.taleworlds.com/download/mb_module_system_0731_0.zip
Some of the many changes include:
Added pf_no_label flag to parties which makes a party not display a label (Thanks to Thorgrim for suggesting this!)
Added store_random_in_range and store_attribute_level commands. Thanks a lot to Khalid Ibn Valid and Winter for their suggestions.
New module file: scene_props.txt you need to copy this over to your module.
New module file: particle_systems.txt you need to copy this over to your module.
New module file: sounds.txt you need to copy this over to your module.
New module file: simple_triggers.txt you need to copy this over to your module.
There is no limit on number of variables anymore.
Changed map_icons file format. The new format requires id and flags fields.
Added scan_module_sounds directive.
You must add the following lines to module_info.txt
load_resource = grass_meshes
load_resource = plant_meshes
load_resource = xtree_meshes
load_resource = town_houses
load_resource = helpers
load_resource = weapon_meshes_b
load_resource = doors
load_resource = churches
Also there have been lots of changes to mission_templates, so I suggest you use the official version for this.
One of the most powerful new features intrroduced in the new version is the abillity to attach pieces of data to game objects. The attachments are called "slots". You can put any number inside them. For example troop_set_slot and troop_get_slot commands let you attach and retrieve data to troop objects. Suppose you want to keep track of which NPCs the player has met with. Let's assume you decide that, say the seventh slot will hold "1" if player has spoken to an NPC and "0" otherwise (all slots are initially set to 0) . Then whenever we speak to an NPC you'll set the seventh slot with
插入代码块:
(store_conversation_troop, reg(1)),
(troop_set_slot, reg(1), 7, 1),
Then whenever we want to check if we have talked with this NPC before, we may use:
插入代码块:
(store_conversation_troop, reg(1)),
(troop_get_slot,reg(5), reg(1), 7),
(eq, reg(5), 1),
There is no practical limiti to the number of slots you can use, but note that if you assign to a slot 10000, all slots from 0 to 10000 will be created. So try to use the slots with lowr numbers.
I guess that's it for now. I hope you won't have too much trouble porting existing mods. I'll be around if you need to ask any questions.






