How to make permanent war between some factions ?

Users who are viewing this thread

SistA

Recruit
Hi everybody.


First of all, sorry if my english isn't that good, not my first language.

So, here is what i'm looking for. That sound pretty easy but...:

I just want duplicate some armors. Meaning, like lamelar armor, which seems to have the same mesh, but only different textures (saw 5 of them), i want to duplicate the "mail long surcoat" to make different armors (by texturing them differently), while keeping the same mesh...Only a matter of textures so...

I've been looking for days, searching every words that could help me, but never find something usefull...Instead of it, i just lost myself in thousands of programms and tutorials...

I suppose i have to copy some lines, and assign different textures to each one...But never found how to do that...

I have some other questions, but it can wait for now.

Can anyone help me ?

Thanks.
 
So you mean you want edit existing textures? If you don't have editing program download GIMP 2 and dds plugin or just dds converter. Then find the specific texture and then edit and save it with different name.

Then first copy native and give new name to it. Put your new texture in your texures folder. After that you must have OpenBRF and then create new brf. Copy the original mesh from CommonRes brf folder and paste it in you new brf then add newmaterial which is your texture and cross add new texture box.

After that write in mesh selection in the material your materials name. You can delete the old ones.

Save it with new name and put it in to your resource folder

Then adding items easy way you can download Morghs editing tool. Use item editor and find the existing model. Then press add new item. Write your meshes name and press update. Save ghanges and backup itemkinds1.txt

Then go to module.py and add there line
load_mod_resource = (your resources name)



This is really rough written and probably I ain't even right in all things but this have worked for me so far.


 
Yes, i just want to make 3 or more different "mail whit surcoat", only whit different textures...And find them in shop, etc...Like new items.


Thanks, i'll try what you said.
 
Not working.

It appears in shop, but says "unable to find mesh", and my body is invisible, i look like rayman...What did i forget ?
 
It's probably module.py file. That happened to me also at start. Check that you have writed all right.
 
Well, i just did à mistake in mesh name.

But now is another problem, my coat is shining like the heaven...Cose it's white, i certainly forgot something else to make it more realistic.


Actually, i started but just editing the main texture in the main M&B texture folder, and it worked...Overwriting the other one but i knew that and made a backup...So i guess every usefull stuff were already there...But it's a whole new armor, this seems to be a lot of other things to do to make it good...

 
Nevermind, i just had a look on how "Mat" window looked like for the main armor, and edited mine in the same way...

Just writed "specular_shader_skin_bump_high", writed the same numbers in spec RGB and coeff, etc...And it looks good now.


Thanks man.
 
Here is another couple of questions:



1) How can i make all factions vs swadians ? For exemple, Sarranides conquered all the world, except some swadiens cities. So there is still vaegirs, khergits, nords and rhodocks states, but under sarranides control. Is there a way to make them all ennemy of swadian faction, but friends between them ? A permanent war (no peace) vs swadians, but a permanent peace between them.

2) How can i assign cities to swadians ? I want them to control only 2 cities like curaw and khudan for exemple, the rest to other factions.


Is there a way to do that ? Didn't find that while searching...
 
1)  Something like this inside a trigger
(faction_slot_eq, "fac_kingdom_1", slot_faction_state, sfs_active),
(faction_slot_eq, "fac_kingdom_2", slot_faction_state, sfs_active),
(call_script, "script_diplomacy_faction_get_diplomatic_status_with_faction", "fac_kingdom_1", "fac_kingdom_2"),
(neq, reg0, -2),#not at war
(call_script, "script_diplomacy_start_war_between_kingdoms", "fac_kingdom_1", "fac_kingdom_2", 0),
2)  First give the city to the faction via (call_script, "script_give_center_to_faction_aux", "p_town_#", "fac_kingdom_#"),
and then give it to a lord (if you so desire) via (call_script, "script_give_center_to_lord", "p_town_#",  "trp_knight_#_#", 0),
 
Took a look at the M&B warband mod tool, factions editor, and it looks like we can edit relationship there, writing a value between -1 and 1.

If i put -1 from swadia to sarranides, does it mean that it will be a permanent war between thos 2 factions ? Or it only means that there will be a war at start, but also that peace is still possible ?



 
Yes but i don't really know how to do what you told me...

Where do i put thoses lines ?

Can't it work whit my idea ?

I saw that "Rise of khergits" used that way...Meaning, -30 of relationship between last alliance and khanat khergit.

And i don't understand how to assign cities to factions/lords...

Sorry i'm new in that stuff...






Edit: edited title.
 
About permanent war.

Go into module_factions.py.

There you'll find a code somewhat similar to this (I don't have a Native module system around, so took the code from my own mod):
("kingdom_1",  "Kingdom of Aragon", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("kingdom_6", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0xF32D06),
  ("kingdom_2",  "Kingdom of Castille",    0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("kingdom_6", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0xF9EB03),
  ("kingdom_3",  "Kingdom of Leon", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0xE765EF),
  ("kingdom_4",  "Kingdom of Portugal",    0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("kingdom_6", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x60ADE3),
  ("kingdom_5",  "County of Toulouse",  0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0xE56C0A),
  ("kingdom_6",  "Almohad Caliphate",  0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x6B009D),
Here you can set the faction relations at the start of the game, as you can see most kingdoms start at war with kingdom_6 (Almohads), because their relation is set to -0.1 (-10 in game).

If you want this to be permanent, go into module_scripts.py, and find this part, and outcomment it (put a "#" in front of it).

(call_script, "script_randomly_start_war_peace_new", 0),

So it looks like:

#(call_script, "script_randomly_start_war_peace_new", 0),

Lastly, go into simple_triggers.py to again find and outcomment this part:

(call_script, "script_randomly_start_war_peace_new", 1),
Somebody said:
Ignore that crap. Relationships between real factions are set at the beginning of the game, not by those values.

Nope.


Hope I've made it understandable.

I can't make the giving a city to a faction part more clear than Somebody.
 
Ok got some problems.


Firts, my factions.txt looks like this

0 fac_kingdom_1 Kingdom_of_Swadia 0 15628100
0.000000  0.000000  -0.050000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.900000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  -0.020000  0.000000  -0.020000  -0.050000  -0.050000  0.000000  0.000000  -0.100000  0.000000
0 fac_kingdom_2 Kingdom_of_Vaegirs 0 13417369
0.000000  0.000000  -0.050000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.900000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  -0.020000  0.000000  -0.020000  -0.050000  -0.050000  0.000000  0.000000  -0.100000  0.000000
0 fac_kingdom_3 Khergit_Khanate 0 13408767
0.000000  0.000000  -0.050000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.900000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  -0.020000  -0.050000  -0.050000  0.000000  0.000000  -0.100000  0.000000
0 fac_kingdom_4 Kingdom_of_Nords 0 3399133
0.000000  0.000000  -0.050000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.900000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  -0.020000  -0.050000  -0.050000  0.000000  0.000000  -0.100000  0.000000
0 fac_kingdom_5 Kingdom_of_Rhodoks 0 3398963
0.000000  0.000000  -0.050000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.900000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  -0.020000  -0.050000  -0.050000  0.000000  0.000000  -0.100000  0.000000
0 fac_kingdom_6 Sarranid_Sultanate 0 14540083
0.000000  0.000000  -0.050000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.900000  0.000000  0.000000  0.000000  0.000000  0.000000  -0.020000  -0.050000  -0.050000  0.000000  0.000000  -0.100000  0.000000



Well there i think i can use faction editor (morgh's warband mod tool stuff) to set relationship right ? So i guess it's not a big deal so far...Cose i don't really know what those numbers mean...


Then, my script.txt look like this:

randomly_start_war_peace_new -1

In a single line...Just put a # in front of this works ? So far so good, not a problem ?

Finaly, and that's the best part, my simple_triggers.txt looks like this:

Well actually no need to describe it, only billions of numbers...No words at all...

So i'm a bit lost...

I guess the .py ending stuff means that you are using python stuff ? Cause i only have txt editor (and troop editor), that allows me to easily edit stuff like factions/troops/items and so...

So if i understand it all well, the only file making trouble is the simple_trigger one...

And for Somebody's tip, my scripts.txt looks like that:

give_center_to_faction -1
24 21 1 1224979098644774912 22 1 1224979098644774913 4 0 200 1 504403158265495572 546 3 504403158265495572 1 1224979098644774912 1 3 936748722493063483 504403158265495572 0 522 3 1224979098644774914 144115188075856287 8 2341 2 9 1224979098644774914 1290 1 504403158265495569 2320 2 2 1585267068834414740 1 3 936748722493063549 504403158265495569 1224979098644774914 2133 2 144115188075856044 0 3 0 1 3 936748722493063394 1224979098644774912 1224979098644774913 1 1 936748722493063556 6 3 1224979098644774915 432345564227567630 432345564227567637 1 2 936748722493063359 1224979098644774915 3 0 2133 2 144115188075856069 1 4 0 31 2 1224979098644774913 432345564227567630 542 3 432345564227567630 21 2 1 2 936748722493063547 360287970189639680 3 0
give_center_to_faction_aux -1
30 21 1 1224979098644774912 22 1 1224979098644774913 2204 2 1224979098644774914 1224979098644774912 1620 2 1224979098644774912 1224979098644774913 4 0 541 3 1224979098644774912 0 4 521 3 1224979098644774915 1224979098644774912 122 32 2 1224979098644774915 0 132 1 1224979098644774915 1620 2 1224979098644774915 1224979098644774913 3 0 4 0 2147483679 2 1224979098644774913 1224979098644774914 501 3 1224979098644774912 62 1224979098644774914 521 3 1224979098644774916 1224979098644774912 7 501 3 1224979098644774912 7 -1 1677 2 1224979098644774912 0 1 2 936748722493063567 1224979098644774914 3 0 1 2 936748722493063567 1224979098644774913 1 2 936748722493063574 1224979098644774912 4 0 30 2 1224979098644774916 0 2147483679 2 1224979098644774913 432345564227567630 1 2 936748722493063570 1224979098644774916 3 0 6 3 1224979098644774917 648518346341351445 648518346341351625 541 3 1224979098644774917 120 1224979098644774912 1 3 936748722493063394 1224979098644774917 1224979098644774913 3 0


And:

give_center_to_lord -1 + billions of numbers


Same stuff, i suppose that the python stuff make it easier and readable ? So i guess i do need it to finish my job right ?

Sorry for my noobish questions guys  :???:
 
Kazzan said:
Thanks Cruger, does this mean they have permanent peace/war?

Glad I could be to some help.

Kazzan said:
Thanks Cruger, does this mean they have permanent peace/war?

If you define "they" as all faction, then yes. If you want this to only apply for two factions, it gets a little tricky. In that case you'd have to go modify the script rather than uncomment it.

As an example, if you don't want kingdom_1, and kingdom_2 to be at war/peace with each other at any time, but they should have a normal relationship with other factions, you have to add this to two parts of the script. Note I'm using the Warband module system, might be diffrent for normal M&B:

(assign, ":go_on", 1),
(try_begin),
(eq, ":cur_kingdom", "fac_kingdom_1"),
(eq, ":cur_kingdom_2", "fac_kingdom_2"),
(assign, ":go_on", 0),
(else_try),
(eq, ":cur_kingdom_2", "fac_kingdom_1"),
(eq, ":cur_kingdom", "fac_kingdom_2"),
(assign, ":go_on", 0),
(try_end),

(eq, ":go_on", 1),

Add this before:

(call_script, "script_diplomacy_start_peace_between_kingdoms", ":cur_kingdom", ":cur_kingdom_2", ":initializing_war_peace_cond"),

And

(call_script, "script_diplomacy_start_war_between_kingdoms", ":cur_kingdom", ":cur_kingdom_2", ":initializing_war_peace_cond"),

Within the randomly_start_war_peace_new script, and you should be good to go.
 
Back
Top Bottom