-
June 11th, 2023, 13:55 #991
-
June 11th, 2023, 15:04 #992
- Join Date
- Nov 2017
- Location
- North Carolina, USA
- Posts
- 266
-
June 11th, 2023, 16:51 #993
Also, always something to watch for is if you generate a normal compressed file like pak/ext but unpack it to check something or test a small change. Then FG just uses that unpacked one going forward.
Definitely not something that got me like 4 times until I switch to generating unpacked while I am actively working on it…. Nope, not me… *whistles innocently*
-
June 12th, 2023, 16:25 #994
Hmm - I wanted to see what a window would generate and hit the view code button and saw it. Then I went to check on controls, did it again and saw nothing... again... nothing. That's when I noticed that it was popping up off to the side:
xmlpopupCapture.JPG
No clue how I "disassociated" it from RW? Any ideas on how to get RW to open the generated xml "in-app" again?
-
June 13th, 2023, 10:43 #995
You dont.
You might be able to import it into RSW or you might have to copy and paste it into RSW
-
June 18th, 2023, 02:24 #996
- Join Date
- Nov 2017
- Location
- North Carolina, USA
- Posts
- 266
I have a combobox that lists the months in the Harnmaster ruleset. Each month carries certain skill bonuses based on the setting zodiac. So if you start with a Skill Base of 15 in swords but you were born in Angberelius, you get a bump to 16. (See image)
Capture.PNG
Can I script a combobox to modify certain skills based on the month chosen? How would I script that? I figure its an if/then function, but I dont know how to write it so it knows to look for a change in the combobox (and recognize each option in the collection list).
-
June 18th, 2023, 03:01 #997
I don’t know the rules of this rpg.
When you change a control value there is an alert you can handle. If you look in the confluence page API section you can get the names (I’m in the living room reading by my wife so won’t be up for bit - so can’t look at the name atm)
Then given the return value vs the visible string, you can index a table to get the identifier of the attribute you will change and the modifier.
Like
Local mods = ModsByMonth[month]
adjustAttribs(mods.attribute, mods.amount)
AdjAttrib can query for the attribute and set it to current value + amount ;which could be a negative)
Not sure if thawed what you are looking for?
-
June 18th, 2023, 11:31 #998
- Join Date
- Nov 2017
- Location
- North Carolina, USA
- Posts
- 266
No I dont think I need a table. Currently Skill Base in a skill is determined by averaging three attributes. Climbing Skill Base = strength+agility+will/3. I have scripted this to occur for each skill.
If your character was born in a certain month, they receive a +2 to Skill Base for Swords, a +1 to Skill Base for Climbing, a +1 to Skill Base for Basketweaving (for example).
I just need to setup a script so that when the combobox selection changes, it will add those modifiers to each of the appropriate Skill Bases.
-
June 18th, 2023, 21:56 #999
Well, that's kind of what I was trying to say that based on the selected value, you looked up what that month's modifiers are then apply them. If you want, of course you don't have to have it in a table or other db. You could just simply do in onValudChanged() something like:
month = getSelectedValue()
if month == "month_value_id" then
...
elsif month == "month_value_id2" then
...
etc
end
And you could in those ... do the math and modify those skills by the hardcoded values you put there.
I thought your main question was HOW do you get alerted? I am attaching a simplistic print on a combo I already had (I added the onValueChanged using the RW gui pulldown (combo ;P) and clicking the +script button. Of course you can just TYPE it there anytime too.
I added 3 method calls the last two are likely the most interesting - one to print getValue() and the other to get the "code/value" associated with it.
Disclaimer, I haven't coded my combo yet, I recall once using one but I don't recall which method for what. I know one gives you the "text shown" and one the "value" associated, from my fast test it seems it is the 2 I listed though I couldf have sworn it was a different name. Don't have time to look further right now, heading out for dinner.
combobox1.JPG
-
June 18th, 2023, 21:58 #1000
Double post, please delete
Last edited by Varsuuk; June 19th, 2023 at 05:18. Reason: Double post, please delete
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks