[engine] Upper limit for maximum amount of gold

Brainstorm ideas of possible additions to the game. Read this before posting!

Moderator: Forum Moderators

Forum rules
Before posting a new idea, you must read the following:
Post Reply
sv75
Posts: 24
Joined: December 9th, 2008, 9:42 am

[engine] Upper limit for maximum amount of gold

Post by sv75 »

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.
User avatar
Gambit
Loose Screw
Posts: 3266
Joined: August 13th, 2008, 3:00 pm
Location: Dynamica
Contact:

Re: [engine] Upper limit for maximum amount of gold

Post by Gambit »

But consider people designing campaigns where you need more gold. Or where inflation is much higher.
User avatar
Captain_Wrathbow
Posts: 1664
Joined: June 30th, 2009, 2:03 pm
Location: Guardia

Re: [engine] Upper limit for maximum amount of gold

Post by Captain_Wrathbow »

I'm guessing you haven't played Northern Rebirth. :lol2:

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. :hmm:
sv75
Posts: 24
Joined: December 9th, 2008, 9:42 am

Re: [engine] Upper limit for maximum amount of gold

Post by sv75 »

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.
Kanapka
Posts: 130
Joined: May 15th, 2010, 2:15 pm
Location: Poland

Re: [engine] Upper limit for maximum amount of gold

Post by Kanapka »

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.
User avatar
bigkahuna
Posts: 657
Joined: September 11th, 2010, 6:24 pm
Location: In your mind.

Re: [engine] Upper limit for maximum amount of gold

Post by bigkahuna »

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
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.
Check out my campaign Sweet Revenge!
Join the new R2D forum!
Brilliand
Posts: 80
Joined: July 11th, 2009, 12:15 am

Re: [engine] Upper limit for maximum amount of gold

Post by Brilliand »

bigkahuna wrote:

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
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.
I think you'd need:

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
At least, if my assumption is correct that modifications to the WML variable won't automatically propagate to the side.
You are a Dark Adept: you dimmerse yourself in the dark arts...potentially with great rewards....
-JW's personality quiz
User avatar
bigkahuna
Posts: 657
Joined: September 11th, 2010, 6:24 pm
Location: In your mind.

Re: [engine] Upper limit for maximum amount of gold

Post by bigkahuna »

Brilliand wrote:At least, if my assumption is correct that modifications to the WML variable won't automatically propagate to the side.
My bad - you're right. Forgot about that.
Check out my campaign Sweet Revenge!
Join the new R2D forum!
Post Reply