Ios content development| South Guard revisited

Discussion and development of scenarios and campaigns for the game.

Moderator: Forum Moderators

Post Reply
monokli
Posts: 31
Joined: November 13th, 2011, 4:56 am
Location: Southern Quadrant/unknown

Ios content development| South Guard revisited

Post by monokli »

So. My iphone 4 has a file manager with an inbuilt text editor, AND, the 1.6 wesnoth (latest mobile) installed.

So, I have decided to tailor the South Guard to my tastes. How can I have it show up in the game ( in case I make a separate campaign like: The South Guard B in the app's documents/data folder), or have the changes take effect (if I edit the campaign's scenario files directly)?

So far the changes are:
1:Bttb:
Moreth is changed on hard: Peasant->Spearman
Surprise village: Normal Aleron: Peasant->Bowman | Hard footpad is now a loyal unit who joins you. (diversity)
Enemy gets more diverse units, more gold/income

2:Pbts:
Skelly archers for bandit leader on every difficulty after keep capture.
Spawned guards of westin changed: 1 peasant->Heavy Infantryman
1 peasant-> Mage // these two are for countering skeletons later, because originally there are no hard counters at your disposal.
rest two are peasants
Allow recruit: Mage (Subject to change)

4: Vot:
Elvish Bodyguards: fixed number to 3 for all difficulties, arrival fixed to turn 5: no need to sacrifice units
Skelly archers for adept, ghost on hard.

5: Citf:
Better units for lich, more income for zombie and lich.

...

9: Vengeance: planned changes into a more epic battle.
User avatar
Bonteaux
Posts: 22
Joined: November 10th, 2011, 6:49 pm

Re: Ios content development| South Guard revisited

Post by Bonteaux »

The following is how it would be under linux, wesnoth 1.9.x, but most is quite probably exactly the same for your version, or easily transferable to it.

The best thing to do would be to copy the 'The_South_Guard' campaign folder from the wesnoth main data/campaign folder to your user add-ons folder (or the main data/campaign folder) under a new name. (That way you can keep a copy of the original around for comparison, which might be useful in case something breaks in your copy). You could also make a backup of the original and change the mainline campaign itself, but if you decide to share your version with others, you'll need to make a separate copy anyway...

Now you'll need to edit some files, so your copy doesn't conflict with the original, and uses only files from your copy. The following might seem like a lot to do, that's because the campaign name and folder appears in quite a few places.

1. In the _main.cfg file (in the root directory of the copied campaign)

Change the

Code: Select all

    id=The_South_Guard
and the

Code: Select all

name= _ "The South Guard"
to whatever you decided to call it (keep the id without spaces though). And change the

Code: Select all

    abbrev= _ "TSG"
maybe to "TSGB" or so (this is, I think, what determines the prefix of save game filenames). Another thing you need to change file include lines like this

Code: Select all

{campaigns/The_South_Guard/utils}
to point to your new campaign copy. That would either be

Code: Select all

{campaigns/The_South_Guard_B/utils}
if you keep it in the main wesnoth folder, or something like

Code: Select all

{~add-ons/The_South_Guard_B/utils}
if you copied it to your user folder (if the iOS version has one). Otherwise you'll keep including macros, scenarios and units from the official version and your changes won't show up. And for the images, change the binary path tag to point to your copy as well. Finally, you should change the

Code: Select all

    define=CAMPAIGN_THE_SOUTH_GUARD
to a different define and search&replace this in all the .cfg files where it appears.

2. In *all* the .cfg files (under scenarios, utils and units)
You'll need to also change all the file include lines as you did in the _main.cfg. Then, change the

Code: Select all

   map_data="{campaigns/The_South_Guard/maps/01_Born_to_the_Banner.map}"
code the same as the include directives mentioned above, to point to your campaign.

If you want to do it really right, you should also replace the

Code: Select all

[textdomain]
    name="wesnoth-tsg"
[/textdomain]
with and every occurance of

Code: Select all

#textdomain wesnoth-tsg
in all the .cfg files. That way if you decide to also change dialog, etc... your campaign can have it's own translations (I think that's the importance of the textdomain).

3. I'm not completely sure about the macro names and the scenario ids, but that should be taken care of by the 'define=' and the '#ifdef' in _main.cfg.

Now you should have a campaign that uses no files from the original copy and won't conflict with it either.
"UM BROK HIT YOU!" -- Um Brok, Swamplings
monokli
Posts: 31
Joined: November 13th, 2011, 4:56 am
Location: Southern Quadrant/unknown

Re: Ios content development| South Guard revisited

Post by monokli »

That's nice and clean, even it's logical and I think... Hell! I know that it works on a desktop linux... But what I have is the last Iphone version, and it doesn't work... Yet. Well, at least putting it in the game's main data/campaigns fails to show up, if put in userdir/data/campaigns, then it can be persuaded to find it by loading the skirmish menu, but progress bar stays at zero.

It's in the iphone/pad support thread, my bad for poorly distinguishing the two topics, but while you are here can you comment on some of the planned changes instead? Again, sorry for possible double posting, I'll edit my first post when I get back to a desktop.
Post Reply