How to get pages to appear after completion?

A place to find all custom made campaigns, mods and to discuss the story mode and how to create mods.
Locked
night_day
Posts: 10
Joined: Wed Jan 05, 2011 7:52 pm

How to get pages to appear after completion?

Post by night_day »

I'm taking a crack at a story, but was wondering, in a long story, how can you allow users to return to where they are in the chapters? I haven't tried Brother's War yet, but I've looked at the story xml, but nothing seems to jump out in the code to indicate how that is accomplished. Thanks!
abrasax
Posts: 976
Joined: Wed Oct 15, 2008 7:46 am
Location: Switzerland

Re: How to get pages to appear after completion?

Post by abrasax »

Hi,

not sure I understand your question. The current status (and current page) are tracked in the player folder in a .dat file so that when a user exit and return to a campaign its automatically bringing him to the last page he was.

If you think about jump into the campaign it depend on either winning condition and/or answer to a question, that allow you to specify where in the story the player should jump.

Grü

Abra
We need your Help !!!
New to wagic ? Be sure to check the following :

Bug report: Bug reporting
Help us: Add cards & Compiling.
Customize: Themes FAQ, All images thread, Abra's Mediafire folder
night_day
Posts: 10
Joined: Wed Jan 05, 2011 7:52 pm

Re: How to get pages to appear after completion?

Post by night_day »

I'm thinking when you complete the whole thing and want to jump to a certain page. The demo 0.1 story doesn't seem to allow you to do this? (If I wanted to replay a certain part of the story)
abrasax
Posts: 976
Joined: Wed Oct 15, 2008 7:46 am
Location: Switzerland

Re: How to get pages to appear after completion?

Post by abrasax »

Ok,

Well you can do that (and it's actually possible in Brother's war) for that you have two solutions:
- You create a <answer> at the end with the questions "Replay part 1", "Replay part2" etc... etc.. The disadvantage of such a solution is that it is like if you never finished the campaign and you will start from where you are jumping to as if you started from this position in the campaign. This is available in Brother's war at the end of each part, the reason why I added this is because you only get bonus if you solve the challenge in the first attempt, hence some people might want to replay the part they just played just to get the bonuses...(but if you jump to part 1, once you refinished part1 you will go to part 2, then part 3, etc... and not back to the end)
- You can also create a "duplicate" of some part of the game to be replayed. In the Brother's war campaign all challenges are present 3 times, the original one, a duplicate in case you did not win the first time (because bonus are coded to be granted only if you solve the challenge the first time) and a "bonus version". When at the end of the game I coded a bonus screen and you can jump to any of the challenges to be replayed once again, once won or lost you get back to the bonus pages.... This is not as much time consuming to code as it seems but should only be done when your campaign is really finished, hence you will always have to update it...

So depending on what you want to do, I think the second solution would be the best. You can test it if you whish for brother's war, just look at the story.xml and note the name of the bonus page. Then open the data.dat file in your player folder with some text editor like notepad and replace the name of the current page with the name of the bonus page so that you can see how the bonus look like...

Grü

Abra
We need your Help !!!
New to wagic ? Be sure to check the following :

Bug report: Bug reporting
Help us: Add cards & Compiling.
Customize: Themes FAQ, All images thread, Abra's Mediafire folder
night_day
Posts: 10
Joined: Wed Jan 05, 2011 7:52 pm

Re: How to get pages to appear after completion?

Post by night_day »

Thanks Abra.

I hit a snag on my first attempt, which was basically, 2 premade decks duel. When I made the first deck, it was fine against the R/G from the tutorial. When I added my opponent deck (replacing the R/G) the game hangs around round 5/6. Not sure if my deck code is off or what.

NM, I assume it's unsupported cards issue. Will update my lists to reflect that.
Locked