Just a quick note to say thankyou for your guides I am new to modding and they have been invaluable... A great Help .. and because of your writing style I found them easy to understand...
Just a quick note to say thankyou for your guides I am new to modding and they have been invaluable... A great Help .. and because of your writing style I found them easy to understand...
May the Forest shelter you
May the wind protect you
&
May your packmates
always answer
to your call
I'm new to scripting, so bear with me.
I want a script that gives the other factions (non player) money every turn, extra depending on the state of their economy.
Would this work? (I'm having troubles getting mods to work at the moment, so I cant test it)
ThanksCode:script declare_counter loop set_counter loop 0 monitor_event FactionTurnStart and not FactionIsLocal console_command add_money 2000 end_monitor monitor_event FactionTurnStart and not FactionIsLocal and Treasury < 2000 console_command add_money 2000 end monitor monitor_event FactionTurnStart and not FactionIsLocal and Treasury < 5000 console_command add_money 2000 end monitor while I_CompareCounter loop = 0 end_while end_script
Last edited by Psyco; 01-16-2007 at 06:26.
Anyone who has no fear of death himself can succeed in inflicting it.
The Prince,
Machiavelli
Your script won't work as you intend. When no faction is specified, the add_money console command puts the specified funds in the player's treasury.
You need to repeat each of your monitors for every faction and specify the faction name in the add_money console command:
This need for duplication is responsible for the EB background script running to over 165,000 lines of code.Code:monitor_event FactionTurnStart FactionType seleucid and not FactionIsLocal console_command add_money seleucid, 2000 end_monitor monitor_event FactionTurnStart FactionType spain and not FactionIsLocal console_command add_money spain, 2000 end_monitor ...(et cetera)
The truth is the most valuable thing we have. Let us economize it. - Mark Twain
Thanks for the help.
Is there any list that shows which versions of the names I should be using? I would assume the ones at the top of descr_strat.txt, but it never hurts to ask.
I'm doing this for Medieval II, but I've heard the architecture is nearly identical, so it shouldn't matter.
Last edited by Psyco; 01-17-2007 at 03:31.
Anyone who has no fear of death himself can succeed in inflicting it.
The Prince,
Machiavelli
Yes, that's right. M2TW has the faction names in descr_strat.txt too.Originally Posted by Psyco
The truth is the most valuable thing we have. Let us economize it. - Mark Twain
Thanks for all the help. I appreciate it.
Anyone who has no fear of death himself can succeed in inflicting it.
The Prince,
Machiavelli
Hi all. I want to write a script to achieve this result: Every time I press the "disband unit" button, it will create a certain unit in a certain city.
As you can see, the problem is I don't know what the real button ID of "disband unit". The CA docudemon says it can be found in a file called available_ui_elements.txt. But where can I find it?Code:script declare_counter loop set_counter loop 1 monitor_event ButtonPressed ButtonPressed disband_unit console_command create_unit Bordeaux "Dismounted Feudal Knights80" 1 end_monitor while I_CompareCounter loop = 1 end_while end_script
Bookmarks