Change of code to suit BfW 1.9.5

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
chak_abhi
Posts: 347
Joined: June 24th, 2010, 3:37 pm

Change of code to suit BfW 1.9.5

Post by chak_abhi »

I was using Wesnoth 1.8.4 for a long period,and have also prepared a campaign "Rebellion in the North" using the particular version of Wesnoth.I have recently upgraded to the current version of Wesnoth (1.9.5).When I try to play the campaign certain error messages come up.It seems that some codes are not supported in this version.They are the following:

Code: Select all

#textdomain wesnoth-Rebellion_in_the_North
[scenario]
    id=xyz
    name=_ "xyz"
    map_data="{~add-ons/Rebellion_in_the_North/maps/xyz.map}"
    {TURNS 40 35 30}
    next_scenario=abc

    {DEFAULT_SCHEDULE}
    {DEFAULT_MUSIC_PLAYLIST}

    [story]
    [part]
        show_title=yes
        {TO_XYZ}
    background=maps/wesnoth.png
    [/part]
    [/story]

Code: Select all

{CHG_TERRAIN Ms (25-28) (37-40)}
The portions which are marked as errors are the ones involving "show title" and "change terrain".Can anyone provide me the right modifications?
alluton
Posts: 420
Joined: June 26th, 2010, 6:49 pm
Location: Finland

Re: Change of code to suit BfW 1.9.5

Post by alluton »

i know too that many campaigns first scenario dont start. 1.9.5 isnt still rdy for campaigns i guess...
"This game cured me of my real life addiction."
-Flameslash
Anonymissimus
Inactive Developer
Posts: 2461
Joined: August 15th, 2008, 8:46 pm
Location: Germany

Re: Change of code to suit BfW 1.9.5

Post by Anonymissimus »

Sorry dudes, it's ready...

Hard to guess what's wrong without you providing the exact error message however.
projects (BfW 1.12):
A Simple Campaign: campaign draft for wml startersPlan Your Advancements: mp mod
The Earth's Gut: sp campaignSettlers of Wesnoth: mp scenarioWesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
chak_abhi
Posts: 347
Joined: June 24th, 2010, 3:37 pm

Re: Change of code to suit BfW 1.9.5

Post by chak_abhi »

Anonymissimus wrote:Sorry dudes, it's ready...

Hard to guess what's wrong without you providing the exact error message however.
The error messages are of the same type,and read "Missing macro/file '{CHG_TERRAIN Ms (25-27) (30-35)} at add-ons/Rebellion_in_the_North/scenarios/scenario_name:cfg 18 at dd-ons/Rebellion_in_the_North/main.cfg" (not the exact message but similar to them)
Anonymissimus
Inactive Developer
Posts: 2461
Joined: August 15th, 2008, 8:46 pm
Location: Germany

Re: Change of code to suit BfW 1.9.5

Post by Anonymissimus »

Did {CHG_TERRAIN Ms (25-28) (37-40)} ever do what it's supposed to ? I doubt it since that error message likely means that your macro inclusion (order) is somehow broken, causing that macro call to be unknown by the preprocessor at the time it encounters it.
A quick dumb "fix" is to comment out that line with the macro call.
projects (BfW 1.12):
A Simple Campaign: campaign draft for wml startersPlan Your Advancements: mp mod
The Earth's Gut: sp campaignSettlers of Wesnoth: mp scenarioWesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
monochromatic
Posts: 1549
Joined: June 18th, 2009, 1:45 am

Re: Change of code to suit BfW 1.9.5

Post by monochromatic »

Post _main.cfg pls.
chak_abhi
Posts: 347
Joined: June 24th, 2010, 3:37 pm

Re: Change of code to suit BfW 1.9.5

Post by chak_abhi »

Anonymissimus wrote:Did {CHG_TERRAIN Ms (25-28) (37-40)} ever do what it's supposed to ? I doubt it since that error message likely means that your macro inclusion (order) is somehow broken, causing that macro call to be unknown by the preprocessor at the time it encounters it.
A quick dumb "fix" is to comment out that line with the macro call.
This code has been used in the scenario "Glory" of the mainline campaign "Liberty" (to dismantle the castle of Helicrom if he does not come to help).Anyway,I can't follow the last line of your message.

If posting the file "-main.cfg" helps then here it is.I need the code for the title portion very much,the change of terrain can be addressed by an alternative code too.
Attachments
_main.cfg
(1.49 KiB) Downloaded 163 times
Anonymissimus
Inactive Developer
Posts: 2461
Joined: August 15th, 2008, 8:46 pm
Location: Germany

Re: Change of code to suit BfW 1.9.5

Post by Anonymissimus »

chak_abhi wrote:
Anonymissimus wrote:Did {CHG_TERRAIN Ms (25-28) (37-40)} ever do what it's supposed to ? I doubt it since that error message likely means that your macro inclusion (order) is somehow broken, causing that macro call to be unknown by the preprocessor at the time it encounters it.
A quick dumb "fix" is to comment out that line with the macro call.
Anyway,I can't follow the last line of your message.
Whenever you get the "macro/file xy is missing at" - error you can "solve" it by removing that call to that macro/file:
{CHG_TERRAIN Ms (25-28) (37-40)} :arrow: #{CHG_TERRAIN Ms (25-28) (37-40)}
Or just leave it away.
(So you see whether the addon at least loads and you can deal with the lacking functionality because of this later, or resolve the macro call.)
projects (BfW 1.12):
A Simple Campaign: campaign draft for wml startersPlan Your Advancements: mp mod
The Earth's Gut: sp campaignSettlers of Wesnoth: mp scenarioWesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
chak_abhi
Posts: 347
Joined: June 24th, 2010, 3:37 pm

Re: Change of code to suit BfW 1.9.5

Post by chak_abhi »

Removing the portions which are designated as errors makes the campaign functional.I have already uploaded it in the 1.9x server.
But the problem remains--the purpose of those codes remain unfulfilled.I want to show the scenario titles at the beginning of each scenario for which I need the modifications.
User avatar
Alarantalara
Art Contributor
Posts: 786
Joined: April 23rd, 2010, 8:17 pm
Location: Canada

Re: Change of code to suit BfW 1.9.5

Post by Alarantalara »

CHG_TERRAIN is a macro defined within the Liberty campaign. Therefore it's not available outside that campaign. You could either copy the macro to an appropriate spot within your campaign (it's in utils/utils.cfg) or replace your use of it with the appropriate WML.

Code: Select all

[terrain]
    terrain=Ms
    x=25-28
    y=37-40
[/terrain]
monochromatic
Posts: 1549
Joined: June 18th, 2009, 1:45 am

Re: Change of code to suit BfW 1.9.5

Post by monochromatic »

Alarantalara wrote:CHG_TERRAIN is a macro defined within the Liberty campaign. Therefore it's not available outside that campaign. You could either copy the macro to an appropriate spot within your campaign (it's in utils/utils.cfg) or replace your use of it with the appropriate WML.

Code: Select all

[terrain]
    terrain=Ms
    x=25-28
    y=37-40
[/terrain]
Which is stupid because there is already a MODIFY_TERRAIN macro in mainline with exactly the same functionality. http://www.wesnoth.org/macro-reference. ... -utils.cfg
Post Reply