[SOLVED] Utils folder appear to not load

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
Xindage
Posts: 21
Joined: August 2nd, 2018, 12:56 am
Location: Brazil

[SOLVED] Utils folder appear to not load

Post by Xindage »

I'm having a hard issue of i was trying to fix for like 2 weeks whitout any success, so i have to ask there, for some reason this campaing of i'm editing refuse to load any .cfg file from "\utils" folder, i have also look on WML tutorial and still nothing seens to work.
What i'm expecting is from a definition called TNE_STORY01 to load in scenario 1 but i was forced to # this def in my first scenario, because every time i try to use this def the game crash sayign that was not definied.
following code of main.cfg

Code: Select all

#textdomain wesnoth-tne

[textdomain]	
	name = "wesnoth-tne"	
	path = "data/add-ons/the_nothern_expedition/translations"	
[/textdomain]

[campaign]
	
	id = "The_nothern_expedition"
	

	icon= "units/elves-wood/captain-leading.png~RC(magenta>teal)"
    image= "portraits/elves/captain.png"
	
	name = _ "The Nothern Expedition"
	
	abbrev = _ "TNE"
	
	first_scenario = "01_Defending_the_fortress"
	
	{CAMPAIGN_DIFFICULTY EASY "units/elves-wood/fighter.png~RC(magenta>teal)" ( _ "Fighter") ( _ "Easy")}
	{CAMPAIGN_DIFFICULTY NORMAL "units/elves-wood/captain.png~RC(magenta>teal)" ( _ "captain") ( _ "Normal")}
	{DEFAULT_DIFFICULTY}
	{CAMPAIGN_DIFFICULTY HARD "units/elves-wood/marshal.png~RC(magenta>teal)" ( _ "marshal") ( _ "Hard")}

	
	define=CAMPAIGN_TNE
	
	description = _ "After several attacks by Orc hordes in his land, lord Francis of Wesnoth marshaled an expedition to the north lands to eliminate the threat. In this expedition many contributed including the Elves who sent a significant amount of troups under the command of an Elf of questionable origin called Warren.
	
(Intermediare Difficult, 12 scenarios.)"
	
[/campaign]
#ifdef CAMPAIGN_TNE
	
	[binary_path]
		
		path = data/add-ons/the_nothern_expedition
		
	[/binary_path]
	
	{~add-ons/the_nothern_expedition/scenarios}
	{~add-ons/the_nothern_expedition/utils}
#endif
For who recognized it, it's a really old abandone campaing since wesnoth 1.4 and i'm trying to convert it back, now back to topic i'm expecting to this line "{~add-ons/the_nothern_expedition/utils}" load the utils inside the campain but this wont happen.
i'm probably missing something in the scenario or something else i'm really lost. :hmm:

Code: Select all

#textdomain wesnoth-tne

[scenario]
	
	name = _ "Defending the Fortress"
	id = 01_Defending_the_fortress
	
	map_data = "{~add-ons/the_nothern_expedition/maps/01_Defending_the_fortress.map}"
	
	next_scenario = null
	
#	{TNE_STORY_01}
#	{TNE_ROUTE_01}
	{DEFAULT_SCHEDULE}
	{DEFAULT_MUSIC_PLAYLIST}
    {TURNS 15 20 25}
    victory_when_enemies_defeated=yes
# Code cut here.
i cut this code because from down here it's just side & events code, probably useless to spot where is the error, since whitout this 2 definitions it play normaly.
the ignored defs are present in utils/story.cfg and utils/route.cfg and is properly defined so what's the issue? just in case here's the story.cfg file.

Code: Select all

#textdomain wesnoth-tne

#define TNE_STORY_01
[story]
	[part]
        background="maps/wesnoth.png"
        story= _ "Somewhere in the north-east of Wesnoth, a lord called Francis was defending his lands from the Orcs. The war between his men and the Orcs was almost over, but a desperate attack from Orcs forced him to withdraw in an abandoned fortress."
	[/part]
[/story]
#enddef
Last edited by Xindage on September 18th, 2018, 11:52 pm, edited 2 times in total.
User avatar
tamanegi
Posts: 160
Joined: August 25th, 2014, 11:38 am
Location: Japan

Re: Utils folder appear to not load

Post by tamanegi »

Code: Select all

	{~add-ons/the_nothern_expedition/scenarios}
	{~add-ons/the_nothern_expedition/utils}
may be

Code: Select all

	{~add-ons/the_nothern_expedition/utils}
	{~add-ons/the_nothern_expedition/scenarios}
Macros should be defined before loading scenarios. ;)
Discord: @tamanegi
It is true that we cannot be free from bugs, but at least let our bugs not always the same...
A Group in a War: my first campaign, An Independence War: and the sequel
Xindage
Posts: 21
Joined: August 2nd, 2018, 12:56 am
Location: Brazil

Re: Utils folder appear to not load

Post by Xindage »

thanks, poblem solved.
Post Reply