Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Zephilinox said:
I believe it's all set up in script_initialize_aristocracy, to what extent it needs to be modified I'm not sure. Perhaps just setting all slot_troop_father/mother/spouse/whatever to 0 will be enough.
Actually, set them to -1. 0 equals the player, which will lead to some awkward results. :grin:
 
Lumos said:
Zephilinox said:
I believe it's all set up in script_initialize_aristocracy, to what extent it needs to be modified I'm not sure. Perhaps just setting all slot_troop_father/mother/spouse/whatever to 0 will be enough.
Actually, set them to -1. 0 equals the player, which will lead to some awkward results. :grin:

I will just delete the script and see what happens.

Edit
Also where do you edit what maps are available to use for multiplayer.
 
xPearse said:
Lumos said:
Zephilinox said:
I believe it's all set up in script_initialize_aristocracy, to what extent it needs to be modified I'm not sure. Perhaps just setting all slot_troop_father/mother/spouse/whatever to 0 will be enough.
Actually, set them to -1. 0 equals the player, which will lead to some awkward results. :grin:
I will just delete the script and see what happens.
No, you won't, because all slots are automatically initialised to zero. If you do remove the call to the script though, make double- and triple-sure that these relations slots are initted to -1 from one code block in game_start.
 
Never do delete any Native code block completely. Everything is being called somewhere -some hardcoded, you will have most awkward results after it is too late to realize where you have done the mistake-, don't comment out the script. You can just do a very simple workaround like commenting out entire mass of code within the script and replace it with one quite stupid line of code which actually does nothing, but only works as a "replacement" for the compiling to work. This should work for aristocracy at least.
 
cwr said:
So... I finally got Thorgrim's Map Editor to work, and I made some ford terrain so the player could travel by sea. But, in-game, this happened:
3B079F1901E1E868CE5D5395646C20760C3BE353

Can someone help, please?

Yeah, copy the material
Code:
map_ocean
and duplicate it, call it
Code:
map_bridge
and delete or rename the original. That should work.
In the module system, the material number 7;
Code:
rt_ford
, is called
Code:
rt_bridge
. Proof here, from my map editor, cartographer.

Here's the complete list of hardcoded map materials called by the engine as of now, in case any of you need them for some reason:

Code:
map_reverse_foam
map_foam
map_shore
map_bridge
map_mountain_forest
map_river
map_desert
map_snow
map_steppe
map_plain
map_mountain
map_ocean
 
Swyter said:
cwr said:
So... I finally got Thorgrim's Map Editor to work, and I made some ford terrain so the player could travel by sea. But, in-game, this happened:
3B079F1901E1E868CE5D5395646C20760C3BE353

Can someone help, please?

Yeah, copy the material
Code:
map_ocean
and duplicate it, call it
Code:
map_bridge
and delete or rename the original. That should work.
In the module system, the material number 7;
Code:
rt_ford
, is called
Code:
rt_bridge
. Proof here, from my map editor, cartographer.

Doesn't work, as far as I know.
 
Cozur said:
Doesn't work, as far as I know.
Then try with other materials. It's not magic, that's why I posted the entire list of possibles. I have my suppositions, but I can't test them all.
What is sure is that they use a different set of texture slots and shaders. Put them under the same rules, and test.
 
A little (and silly) question - how do I assign specific goods to specific cities? Khudan has Iron, Tulga has Salt, etc. etc. Most likely I'm missing something mega obvious, but well, never really modded Warband so I have little idea where to look for it.
 
Anjin Miura said:
A little (and silly) question - how do I assign specific goods to specific cities? Khudan has Iron, Tulga has Salt, etc. etc. Most likely I'm missing something mega obvious, but well, never really modded Warband so I have little idea where to look for it.

On the
Code:
game_start
script, which is large and convoluted, so don't feel silly. They are assigned using party slots.
Take a look in the constants and search down there.
 
Swyter said:
Cozur said:
Doesn't work, as far as I know.
Then try with other materials. It's not magic, that's why I posted the entire list of possibles. I have my suppositions, but I can't test them all.
What is sure is that they use a different set of texture slots and shaders. Put them under the same rules, and test.

Oh yeah, my point was that, as far as I know, you can't change the way it looks. I've been wrestling with this for like two years, and despite a lot of map materials editing and modifying, I've never seen any change in the in-game water. So it must be controlled somewhere else. Beats me where though.
 
He can take a look into triggers.py or scripts.py as well. Search these and examine, I advise:

Code:
# Refresh Armor sellers
  (0.0, 0, 168.0, [],
  [    
    (call_script, "script_refresh_center_armories"),
  ]),

Code:
  ("refresh_center_armories",
  [
    (reset_item_probabilities, 100),
	(set_merchandise_modifier_quality, 150),    
	(try_for_range, ":cur_merchant", armor_merchants_begin, armor_merchants_end),    
	  (store_sub, ":cur_town", ":cur_merchant", armor_merchants_begin),
	  (val_add, ":cur_town", towns_begin),
	  (troop_clear_inventory, ":cur_merchant"),
	  (party_get_slot, ":cur_faction", ":cur_town", slot_center_original_faction),    
	  (troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_body_armor, 16),
	  (troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_head_armor, 16),
	  (troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_foot_armor, 8),
	  (troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_hand_armor, 4),
	  (troop_ensure_inventory_space, ":cur_merchant", merchant_inventory_space),
	  (troop_sort_inventory, ":cur_merchant"),
	  (store_troop_gold, reg6, ":cur_merchant"),
	  (lt, reg6, 1000),
	  (store_random_in_range, ":new_gold", 250, 500),
	  (call_script, "script_troop_add_gold", ":cur_merchant", ":new_gold"),
    (end_try),
  ]),
 
Swyter said:
On the
Code:
game_start
script, which is large and convoluted, so don't feel silly. They are assigned using party slots.
Take a look in the constants and search down there.

Hmmm...

Code:
	#Khudan (tools, leatherwork, smoked fish)
	(party_set_slot, "p_town_9", slot_center_smithies, 18),
	(party_set_slot, "p_town_9", slot_center_tanneries, 3),
	(party_set_slot, "p_town_9", slot_center_fishing_fleet, 5),

This one? Does it determine goods and quantity or "efficiency" of enterprises there?
 
Cozur said:
Swyter said:
Cozur said:
Doesn't work, as far as I know.
Then try with other materials. It's not magic, that's why I posted the entire list of possibles. I have my suppositions, but I can't test them all.
What is sure is that they use a different set of texture slots and shaders. Put them under the same rules, and test.

Oh yeah, my point was that, as far as I know, you can't change the way it looks. I've been wrestling with this for like two years, and despite a lot of map materials editing and modifying, I've never seen any change in the in-game water. So it must be controlled somewhere else. Beats me where though.

The game reads the map.txt file, which contains a number for every triangle. That number specifies a material, every material on there is hardcoded to the list I've provided above. From the material you can change everything; textures, shaders, flags. So really, there isn't much science to that.

If you are talking about the water, changing it is changing the pixel shader, which is getting more complex with every release. Ask someone like Mark7 to help you with that, he's a good tech artist.
 
Lumos said:
xPearse said:
Why does this guy have a head scarf, where would this be defined.
Module_troops?

Not there, it's something to do with scripts. Im guessing faction specific items due to moors type factions. I found the specific item and searched to find anything related in the module system but it didn't come up anything.
 
Is it possible to deal blunt damage to an agent or will I have to manually script the knockout text, wounded in party, remove the agent from the battle, add it as a prisoner if its team loses, etc?
 
Status
Not open for further replies.
Back
Top Bottom