[engine] Upper limit for maximum amount of gold
Moderator: Forum Moderators
Forum rules
Before posting a new idea, you must read the following:
Before posting a new idea, you must read the following:
[engine] Upper limit for maximum amount of gold
Maybe it is not bad idea to add possibility to set upper limit for maximum amount of gold in WML. Carrying too much gold could make some campaigns pretty boring to play.
Last edited by sv75 on January 7th, 2011, 11:45 pm, edited 1 time in total.
Re: [engine] Upper limit for maximum amount of gold
But consider people designing campaigns where you need more gold. Or where inflation is much higher.
- Captain_Wrathbow
- Posts: 1664
- Joined: June 30th, 2009, 2:03 pm
- Location: Guardia
Re: [engine] Upper limit for maximum amount of gold
I'm guessing you haven't played Northern Rebirth.
If the top limit was universally set at something like 800, campaigns like NR wouldn't work right, and if you had a limit of 10,000+ gold to accommodate campaigns like NR, (can't remember offhand exactly how much you get in the one NR scenario, so I'm guessing) it would have basically no effect on other campaigns...
Sooo.... a universal gold top-limit wouldn't work. Perhaps if this idea were to be implemented, it could be an optional key in the campaign's _main.cfg file, so that each campaign could have its own, specific, reasonable limit.
If the top limit was universally set at something like 800, campaigns like NR wouldn't work right, and if you had a limit of 10,000+ gold to accommodate campaigns like NR, (can't remember offhand exactly how much you get in the one NR scenario, so I'm guessing) it would have basically no effect on other campaigns...
Sooo.... a universal gold top-limit wouldn't work. Perhaps if this idea were to be implemented, it could be an optional key in the campaign's _main.cfg file, so that each campaign could have its own, specific, reasonable limit.
Re: [engine] Upper limit for maximum amount of gold
Maybe I was not too clear. I was not saying about *universal* limit.
I'm saying about possible new WML tag, not about mandatory limit in every scenario.
So campaigns authors may use or may not use it.
BTW, I have played almost all campaigns.
I'm saying about possible new WML tag, not about mandatory limit in every scenario.
So campaigns authors may use or may not use it.
BTW, I have played almost all campaigns.
Re: [engine] Upper limit for maximum amount of gold
If I understood correctly, you want to cap maximum amount of gold that you can accumulate during a scenario and cut excess gold in the beginning of the next scenario.
I'm sure it's possible using WML. You can check the gold amount every turn and then lower it accordingly, and do the same in the begining of the next scenario. I guess someone with better knowlegde of WML can write two macros that will do it in 10 minutes.
I'm sure it's possible using WML. You can check the gold amount every turn and then lower it accordingly, and do the same in the begining of the next scenario. I guess someone with better knowlegde of WML can write two macros that will do it in 10 minutes.
Re: [engine] Upper limit for maximum amount of gold
Code: Select all
#define GOLD_LIMIT SIDE MAX
[event]
name=side {SIDE} turn,preload
first_time_only=no
[store_side]
side={SIDE}
variable=stored_side
[/store_side]
[if]
[variable]
name=stored_side.gold
greater_than={MAX}
[/variable]
[then]
{VARIABLE stored_side.gold {MAX}}
[/then]
[/if]
{CLEAR_VARIABLE stored_side}
[/event]
#enddef
Re: [engine] Upper limit for maximum amount of gold
I think you'd need:bigkahuna wrote:This would do it. It checks the sides gold at the start of every turn, scenario, and during turns and alters it if it is above the maximum amount. Put it in scenario toplevel. It could also become a tag with Lua, but I don't really want to try making one right now and this is concise enough and very simple.Code: Select all
#define GOLD_LIMIT SIDE MAX [event] name=side {SIDE} turn,preload first_time_only=no [store_side] side={SIDE} variable=stored_side [/store_side] [if] [variable] name=stored_side.gold greater_than={MAX} [/variable] [then] {VARIABLE stored_side.gold {MAX}} [/then] [/if] {CLEAR_VARIABLE stored_side} [/event] #enddef
Code: Select all
#define GOLD_LIMIT SIDE MAX
[event]
name=side {SIDE} turn,preload
first_time_only=no
[store_side]
side={SIDE}
variable=stored_side
[/store_side]
[if]
[variable]
name=stored_side.gold
greater_than={MAX}
[/variable]
[then]
{VARIABLE_OP stored_side.gold sub {MAX}}
[gold]
side={SIDE}
amount=-$stored_side.gold
[/gold]
[/then]
[/if]
{CLEAR_VARIABLE stored_side}
[/event]
#enddef
You are a Dark Adept: you dimmerse yourself in the dark arts...potentially with great rewards....
-JW's personality quiz
-JW's personality quiz
Re: [engine] Upper limit for maximum amount of gold
My bad - you're right. Forgot about that.Brilliand wrote:At least, if my assumption is correct that modifications to the WML variable won't automatically propagate to the side.