What you need to get the Trait condition work is an exported character_record, and condition monitors don't export values; you'll need an event monitor, and convenient events to do that are far and few between.
What you need to get the Trait condition work is an exported character_record, and condition monitors don't export values; you'll need an event monitor, and convenient events to do that are far and few between.
I have a question regarding scripts.
I'm trying to get a show_me script to run from a background script, but it doesn't seem to be working. This is similar to the Client Kingdoms mod implemented into the TFT mod. The background script works fine and all other functions within it work as intended. Here is the background script section that is supposed to start the show_me script:
This is just temporary until I can get it working - then I'll tweak the costs and add a RandomPercent. Here is the advice thread it refers to:Code:monitor_event SettlementTurnStart SettlementName Rome and SettlementIsLocal and Treasury > 5000 advance_advice_thread Recruit_Legion_Thread end_monitor
And yes, I have set up the text. Finally, here is the whole show_me script:Code:AdviceThread Recruit_Legion_Thread GameArea Campaign Item Recruit_Legion Uninhibitable Verbosity 0 Threshold 1 Attitude Normal Presentation Default Title Recruit_Legion_Title Script scripts\show_me\recruit_roman_legion.txt Text Recruit_Legion_Text1
Can anyone see what I'm doing wrong here? I've tried changing it so that the script runs when Rome is selected using I_SettlementSelected SettlementName Rome but no dice...Code:script console_command create_unit Rome "roman hastati" 2 console_command create_unit Rome "roman princeps" 2 console_command create_unit Rome "roman velite" 2 console_command create_unit Rome "roman Triarii" 1 console_command create_unit Rome "roman light cavalry" 1 console_command add_money -5000 console_command add_population Rome -1210 select_ui_element advisor_dismiss_button simulate_mouse_click lclick_down simulate_mouse_click lclick_up terminate_script end_script
Well, perhaps it's a silly answer, but the first possible mistake is "roman Triarii" instead of "roman triarii".
The second point is that I cannot see the need for a background script only for this purpose. It would be enough with a normal trigger in export_descr_advice, as in Client Kingdoms mod.
Third point: Did you try the final script without the authomatic "button pressing"?
You should include some "mark" just to know where the method is failing.
Good luck!![]()
When you say not working, does the advisor come up at all? Do you have entries in text\export_advice for that advice thread?
Epistolary Richard's modding Rules of CoolCool modders make their mods with the :mod command line switch
If they don't, then Cool mod-users use the Mod Enabler (JSGME)
Cool modders use show_err
Cool modders use the tutorials database
Cool modders check out the Welcome to the Modding Forums! thread
Cool modders keep backups
Cool modders help each other out
AFAIK RTW doesn't support multiple scripts running side by side; you'll have to include the event script in the background script in an event_monitor ButtonPressed ButtonPressed advisor_button_of_choice (excluding show_me button - no multiple scripts -> no script running -> no registered click on the button, or something to that effect; this limits the button quite surely to advisor_portrait_button).
Didn't think of that. I'll fix it an give it a go.Well, perhaps it's a silly answer, but the first possible mistake is "roman Triarii" instead of "roman triarii".
Sorry, I didn't make it clear. I'm running a background script for a whole lot of things - such as 4tpy, historical events and such. I wanted to add this as a show_me script from the background script as the background script has the "suspend_unscripted_advice true" line added (otherwise I couldn't stop the script from continuously reloading).The second point is that I cannot see the need for a background script only for this purpose. It would be enough with a normal trigger in export_descr_advice, as in Client Kingdoms mod.
Good point, I'll give it a go if the Triarii typo doesn't fix it.Third point: Did you try the final script without the authomatic "button pressing"?
Not entirely sure what you mean, or how to do it.You should include some "mark" just to know where the method is failing.
Advisor doesn't even come up. Yes, as I said earlier, I have the text set up properly.When you say not working, does the advisor come up at all? Do you have entries in text\export_advice for that advice thread?
Thanks for the help, guys, I'll give the script another go with a few changes.
Good point, but I could have sworn that the TFT mod made this work...AFAIK RTW doesn't support multiple scripts running side by side; you'll have to include the event script in the background script in an event_monitor ButtonPressed ButtonPressed advisor_button_of_choice (excluding show_me button - no multiple scripts -> no script running -> no registered click on the button, or something to that effect; this limits the button quite surely to advisor_portrait_button).
Last edited by Cheexsta; 12-07-2005 at 14:52.
He means put something in the background script monitor or the script so you'll be able to see if its even being accessed. The discerning scripter uses the infamous console_command puppify_my_love for the purpose, for example:Originally Posted by Cheexsta
Code:monitor_event SettlementTurnStart SettlementName Rome and SettlementIsLocal and Treasury > 5000 console_command puppify_my_love advance_advice_thread Recruit_Legion_Thread end_monitor
If your faction symbol turns into a puppy when you fulfil those criteria then you at least know that that monitor is being accessed.
And Mark, I'm pretty sure you can run a show_me script during the campaign script of the Prologue. Guy made a special mention of how difficult it had been to get the two running at the same time.
Epistolary Richard's modding Rules of CoolCool modders make their mods with the :mod command line switch
If they don't, then Cool mod-users use the Mod Enabler (JSGME)
Cool modders use show_err
Cool modders use the tutorials database
Cool modders check out the Welcome to the Modding Forums! thread
Cool modders keep backups
Cool modders help each other out
Hmm. I remember Guy stating that RTW didn't support multiple scripts at all, though I could very well be mistaken. Have you tried declare_show_me command, if that'd affect it?
Bookmarks