Changing Player Base Income and Village Income

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
User avatar
Glen
Posts: 77
Joined: August 20th, 2011, 10:59 pm

Changing Player Base Income and Village Income

Post by Glen »

I want to change player base income to 0 for my multiplayer scenario. On the wiki, it stated the only way to do this is by using the [game_config] tag, so I attempted to use the [game_config] tag but it just gets me an invalid WML error or does nothing at all. I'm not understanding how to implement this in a multiplayer scenario.
User avatar
Lord-Knightmare
Discord Moderator
Posts: 2362
Joined: May 24th, 2010, 5:26 pm
Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
Contact:

Re: Changing Player Base Income and Village Income

Post by Lord-Knightmare »

Glen wrote: August 20th, 2021, 10:20 am I want to change player base income to 0 for my multiplayer scenario. On the wiki, it stated the only way to do this is by using the [game_config] tag, so I attempted to use the [game_config] tag but it just gets me an invalid WML error or does nothing at all. I'm not understanding how to implement this in a multiplayer scenario.

Code: Select all

[side]
    income=-2
    village_gold=0
    village_support=0
[/side]
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
User avatar
Celtic_Minstrel
Developer
Posts: 2216
Joined: August 3rd, 2012, 11:26 pm
Location: Canada
Contact:

Re: Changing Player Base Income and Village Income

Post by Celtic_Minstrel »

The [game_config] tag is not a tag that can be used in add-ons. The only place where these kinds of settings can be customized are in [scenario] and [side]. I don't know if base_income specifically is available in those places, though, but you could try it and, if it works, note it here so we can add it to the documentation. Other than that, it's possible to add a prestart event that customizes it using Lua:

Code: Select all

[event]
	name=prestart
	[lua]
		code="wesnoth.game_config.base_income = 0"
	[/lua]
[/event]
Or, maybe it should be a preload event? I'm not quite sure (you'd have to save and load and see if the base income resets to default).
Author of The Black Cross of Aleron campaign and Default++ era.
Former maintainer of Steelhive.
Post Reply