A place to discuss about The Protectors mod for Warlords Battlecry 3. Visit http://the-protectors.webs.com for more info.
 
HomeCalendarFAQSearchMemberlistUsergroupsRegisterLog in

Share | 
 

 Editor - events

View previous topic View next topic Go down 
Go to page : Previous  1, 2, 3  Next
AuthorMessage
Patrick_the_Winekiller
Devourer of bugs
Devourer of bugs
avatar

Posts : 885
Join date : 2012-01-04

PostSubject: Re: Editor - events   Wed Feb 25, 2015 5:04 am

BON files contain all the bonuses in the campaign. They are gained through a battle reward type=bonus, or through special NIS events (using the bonus command - see manual). I suppose the best way to learn about them is to look for examples in the original campaign.xcr.

VAR files contain all the global variables of a campaign. You can use this storage freely and create as many variables as you need (I believe in the chapters there was need only for one, called global_episode?), also setting their default value (the value they get when you reset/start a new campaign) - should be always set to zero.

_________________

Back to top Go down
View user profile http://the-protectors.webs.com
Zetoo
Bug Catcher
Bug Catcher
avatar

Posts : 334
Join date : 2015-01-28

PostSubject: Re: Editor - events   Wed Feb 25, 2015 5:13 am

Patrick_the_Winekiller wrote:
[...](I believe in the chapters there was need only for one, called global_episode?)[...]
the undead chapter had some more. i can understan companio for Setroth but the others don't.
Code:
<Globals>
 <Variable index="0" id="global_episode" value="0"/>
 <Variable index="1" id="global_dwarf" value="0"/>
 <Variable index="2" id="global_license" value="0"/>
 <Variable index="3" id="companion" value="0"/>
</Globals>

1a''' so what can I do for now? My campaign is all about changing races all the time...
Back to top Go down
View user profile
Patrick_the_Winekiller
Devourer of bugs
Devourer of bugs
avatar

Posts : 885
Join date : 2012-01-04

PostSubject: Re: Editor - events   Wed Feb 25, 2015 5:35 am

Hmmm, well I suppose you can have a filler scenario right at the beginning (be it some dialogue) which rewards the player with ginormous amounts of cookie points for all races (I can only imagine a massive amount of announcements: you are now allied with x, you are now allied with y, you are now allied with z) and then recommend in each battle description what is the intended race. Sorry, that's my best idea Question

Exclamation Spoiler alert Exclamation
The global_dwarf was used to unlock The Tunnel location after completing two other scenarios (global_dwarf would receive the value of 2). Global_license was for monitoring the merchant's license in Theira (global because the first encounter is an ambush type map while the second is an actual location).

_________________

Back to top Go down
View user profile http://the-protectors.webs.com
Zetoo
Bug Catcher
Bug Catcher
avatar

Posts : 334
Join date : 2015-01-28

PostSubject: Re: Editor - events   Wed Feb 25, 2015 9:41 pm

Patrick_the_Winekiller wrote:
Sorry, that's my best idea Question
It's a good idea and the only one right now. but I cannot do that. What I am doing wrong? Also: I cannot give 150 crowns (the system gives me 113crowns) not even with DNO00150 crowns (is it a bug or i'm doing something wrong?).
Code:
//LOC1--> origin//

<Location code="LOC_SUNDEREDISLE">
 <Name>Realms of War</Name>
 <Description>
 <Paragraph>Sartek, Lord of War, once lived here. After a battle with Lord Bane he was cut into 101 pieces and scattered throughout Etheria.</Paragraph>
 <Paragraph>His servants, the Minotaurs, still live here however.</Paragraph>
 </Description>
 <Diplomacy owner="4" hate="0"/>
 <Position x="950" y="105"/>
 <Text x="950" y="65"/>
 
 <Actions>
 <Action code="ACT_TBL1"/>
 <Action code="ACT_TBL_nis1"/>
 </Actions>
 
 <Variables>
 <Variable index="0" id="diplomacy_time" value="0"/>
 <Variable index="1" id="diplomacy" value="0"/>
 </Variables>

 <Links>
 <Link code="LOC_GAPOFAR" traveltime="10" type="Land">Travel to the Gap of Ar</Link>
 </Links>
</Location>

//LOc2//

<Location code="LOC_GAPOFAR">
 <Name>Gap of Ar</Name>
 <Description>
 <Paragraph>The Gap of Ar marks the entry to the Realms of War, Lord Sartek's lands.</Paragraph>
 <Paragraph>Bands of Minotaurs roam freely here.</Paragraph>
 </Description>
 <Diplomacy owner="4" hate="0"/>
 <Position x="778" y="210"/>
 <Text x="778" y="170"/>
 
 <Actions>
 <Action code="ACT_TBL2"/>
 </Actions>
 
 <Conditions>
 <Condition type="check" id="global_episode" action="eq" value="1"/>
 </Conditions>
 
 <Links>
 <Link code="LOC_SUNDEREDISLE" traveltime="10" type="Land">Travel to the R. of War</Link>
 <Link code="LOC_YLARIE" traveltime="6" type="Land">Travel to Ylarie</Link>
 <Link code="LOC_PLAINSOFAR" traveltime="6" type="Land">Travel to the Plains of Ar</Link>
 </Links>
</Location>

//ACT0-->dialogue and diplomacy //

<Action code="ACT_TBL_nis1" type="patnis" instant="1" time="0">  
   <Name>Name</Name>
   <Help>Let the adventures begin!</Help>
   <NIS>_TBL_nis1.nis</NIS>

 <Diplomacy side="0" modification="1000" max="1000"/>
 <Diplomacy side="1" modification="1000" max="1000"/>
 <Diplomacy side="2" modification="1000" max="1000"/>
 <Diplomacy side="3" modification="1000" max="1000"/>
 <Diplomacy side="4" modification="1000" max="1000"/>
 <Diplomacy side="5" modification="1000" max="1000"/>
 <Diplomacy side="6" modification="1000" max="1000"/>
 <Diplomacy side="7" modification="1000" max="1000"/>
 <Diplomacy side="8" modification="1000" max="1000"/>
 <Diplomacy side="9" modification="1000" max="1000"/>
 <Diplomacy side="10" modification="1000" max="1000"/>
 <Diplomacy side="11" modification="1000" max="1000"/>
 <Diplomacy side="12" modification="1000" max="1000"/>
 <Diplomacy side="13" modification="1000" max="1000"/>
 <Diplomacy side="14" modification="1000" max="1000"/>
 <Diplomacy side="15" modification="1000" max="1000"/>
  
   <Conditions>
      <Condition type="check" id="diplomacy" action="eq" value="0"/>
   </Conditions>

</Action>

//ACT1//

<Action code="ACT_TBL1" type="battle">
 <Name>Name</Name>
 <Help>text</Help>
 <Description>text</Description>

 <Reward type="crowns" data="150" shorttext="150 Crowns">We found 150 Crowns</Reward>
 <Reward type="bonus" data="0" shorttext="150 Crowns">We found 150 Crowns</Reward>

 <Map code="MAP_TBL1"/>

 <Conditions>
 <Condition type="checktime" id="diplomacy_time" action="eq" value="1"/>
 <Condition type="victory" id="global_episode" action="add" value="1"/>
 </Conditions>

 <Journal type="victory" important="yes">
 <Paragraph>text</Paragraph>
 <Paragraph>text</Paragraph>
 </Journal>
 <Journal type="defeat" important="no">
 <Paragraph>text</Paragraph>
 <Paragraph>text</Paragraph>
 </Journal>
</Action>

//NIS--> _TBL_nis1.nis//

<NIS>
 <Character id="1" portrait="07">Narrator</Character>
 <Message character="1">text</Message>
 <Message character="1">text</Message>

 <Setvar global="0" name="diplomacy_time" stage="exit">-1</Setvar>
 <Setvar global="0" name="diplomacy">1</Setvar>
 
</NIS>

//MAP//

<Map code="MAP_TBL1">
 <Name file="TBL01"/>
 <Battle victory="standard" points="6" hidden="1" fog="0" level="0" quests="0"/>
 <Side id="0" resources="0" team="1"/>
 <Side id="1" race="12"  resources="2" team="1" ai="0" nohero="1" noretinue="1"/>
 <Side id="2" race="5"  resources="2" team="0" ai="0" nohero="0" noretinue="0"/>
</Map>
Back to top Go down
View user profile
Patrick_the_Winekiller
Devourer of bugs
Devourer of bugs
avatar

Posts : 885
Join date : 2012-01-04

PostSubject: Re: Editor - events   Wed Feb 25, 2015 9:48 pm

That crowns thing might be a bug. Anyway, if you wish to modify the diplomacy through a dialogue, you need to use the NIS command (see manual) within the nis file, not the act file. Also, time_diplomacy was never used, nor the stage "exit".

In the battle act description tag, insert a text like "Suggested race: Dwarf"

_________________

Back to top Go down
View user profile http://the-protectors.webs.com
Zetoo
Bug Catcher
Bug Catcher
avatar

Posts : 334
Join date : 2015-01-28

PostSubject: Re: Editor - events   Wed Feb 25, 2015 9:52 pm

Patrick_the_Winekiller wrote:
[...], time_diplomacy was never used, nor the stage "exit".

It goes smoothly from Knights to Plague (you can see all races being selected and finally shows the only last window: “you are ally with Plague”). It was a real good idea. And obviously you were right about the diplomacy_time thing. Let me put the rest of the campaign together and if minor things come up I’ll ask again.


There is something that is still making me mad:
After completing the first mission, after the diplomatic thing, I can move on etc. but I can also replay that first mission.
This is the respective ACT. I know it's here but don't know what else must do.
Code:
<Conditions>
 <Condition type="check" id="diplomacy" action="eq" value="1"/>
 <Condition type="victory" id="global_episode" action="add" value="1"/>
 <Condition type="defeat" id="global_episode" action="eq" value="1"/>
 </Conditions>


Last edited by Zetoo on Thu Feb 26, 2015 2:19 am; edited 1 time in total (Reason for editing : adding issues....)
Back to top Go down
View user profile
Patrick_the_Winekiller
Devourer of bugs
Devourer of bugs
avatar

Posts : 885
Join date : 2012-01-04

PostSubject: Re: Editor - events   Thu Feb 26, 2015 3:27 am

You just need to add another condition that checks if global_episode is 0 as well.
Code:
<Condition type="check" id="global_episode" action="eq" value="0"/>
Simply put, if you want a mission to not be replayable, variables that are changed in victory/defeat must be present in the check conditions. In your case, global_episode changes to 1 when you win, so it will no longer be 0 causing the act to be unavailable. (BTW, you cannot have type=victory/defeat checks, those only work with add, substract or assign). So the whole thing should look like this:
Code:
<Conditions>
 <Condition type="check" id="global_episode" action="eq" value="0"/>
 <Condition type="check" id="diplomacy" action="eq" value="1"/>
 <Condition type="victory" id="global_episode" action="add" value="1"/>
 <Condition type="defeat" id="global_episode" action="add" value="1"/>
 </Conditions>
Note that in the above code, you cannot replay the mission even if you lost it.

_________________

Back to top Go down
View user profile http://the-protectors.webs.com
Zetoo
Bug Catcher
Bug Catcher
avatar

Posts : 334
Join date : 2015-01-28

PostSubject: Re: Editor - events   Thu Feb 26, 2015 4:34 am

Ok, it works. Now, when I complete the second mission I can go back to R. of war (that is fine) but then Gap of Ar turns to be unavailable.


LOC_GapofAr.loc:

Code:
<Condition type="check" id="global_episode" action="eq" value="1"/>

 I need value=1 to play on stages (one mission after another)...
Back to top Go down
View user profile
Patrick_the_Winekiller
Devourer of bugs
Devourer of bugs
avatar

Posts : 885
Join date : 2012-01-04

PostSubject: Re: Editor - events   Thu Feb 26, 2015 4:41 am

You should try to replace eq with ge (greater than or equal to). That way, when the variable increases further (2,3,4...) the location will remain available.

_________________

Back to top Go down
View user profile http://the-protectors.webs.com
Zetoo
Bug Catcher
Bug Catcher
avatar

Posts : 334
Join date : 2015-01-28

PostSubject: Re: Editor - events   Thu Feb 26, 2015 4:46 am

ok, thanks.
Pat wrote:
Note that in the above code, you cannot replay the mission even if you lost it
So there is no other way around? the first mission must be so easy that I am forbidden to lose it?
Back to top Go down
View user profile
Patrick_the_Winekiller
Devourer of bugs
Devourer of bugs
avatar

Posts : 885
Join date : 2012-01-04

PostSubject: Re: Editor - events   Thu Feb 26, 2015 5:19 am

The way you set it, yes. If you wish to make the map replayable in case of defeat, simply delete the defeat condition type. The variable will then increase only in case of victory.

_________________

Back to top Go down
View user profile http://the-protectors.webs.com
Zetoo
Bug Catcher
Bug Catcher
avatar

Posts : 334
Join date : 2015-01-28

PostSubject: Re: Editor - events   Thu Feb 26, 2015 8:40 pm

It is all going well, for now. Just need some final things:


13. I cannot edit HeroDataTPC.xcr on TPC. I can do that on WBC3 but will be a mess due to perks and stuff. What else do you suggest?
14. I do not know how to change global year/day.
15. No dragons, no titans etc. mode will not be overlapped by my MAP files, am I right?
Back to top Go down
View user profile
Patrick_the_Winekiller
Devourer of bugs
Devourer of bugs
avatar

Posts : 885
Join date : 2012-01-04

PostSubject: Re: Editor - events   Thu Feb 26, 2015 11:40 pm

13. hardcoded
14. hardcoded
15. yes, you are right

TBH, TPC does not yet support custom chapters & campaigns, so some features are limited for now.

_________________

Back to top Go down
View user profile http://the-protectors.webs.com
Zetoo
Bug Catcher
Bug Catcher
avatar

Posts : 334
Join date : 2015-01-28

PostSubject: Re: Editor - events   Fri Feb 27, 2015 4:10 am

ok... almost done!

16. I need to put something inside TBL_WMD_1.nis (at the end?), but have no idea...

Code:
<Action code="ACT_TBL_WMD_1" type="patnis">
 <Name>Moments Later</Name>
 <Help>Moments Later</Help>
 <NIS>TBL_WMD_1.nis</NIS>

 <Conditions>
 <Condition type="check" id="global_episode" action="eq" value="9"/>
 </Conditions>

</Action>

I am stuck in that place after the mesage. Also, I need to add value to 10, so I can move on.
Thanks.
Back to top Go down
View user profile
Patrick_the_Winekiller
Devourer of bugs
Devourer of bugs
avatar

Posts : 885
Join date : 2012-01-04

PostSubject: Re: Editor - events   Fri Feb 27, 2015 7:31 am

16. Just place the nis command:
Code:
<Setvar global=”1”  name=”global_episode”>10</Setvar>
OR
Code:
<Addvar global=”1”  name=”global_episode “>1</Addvar>
Most likely at the end of the NIS file, but anywhere should do (in case of abrupt exit of the game in mid-conversation - power outages, crashes, alt+f4 etc, the save file is not written when the command is called, but rather at the end of the action/conversation anyway).

_________________

Back to top Go down
View user profile http://the-protectors.webs.com
Zetoo
Bug Catcher
Bug Catcher
avatar

Posts : 334
Join date : 2015-01-28

PostSubject: Re: Editor - events   Fri Feb 27, 2015 10:01 pm

17. Now i need Slug fest and assassination, this last one I think it's ok, but slug fest 45 min?

(MAP)
Code:
<Battle victory="slug fest" points="50" hidden="1" fog="1" level="5" quests="0"/>
Back to top Go down
View user profile
Patrick_the_Winekiller
Devourer of bugs
Devourer of bugs
avatar

Posts : 885
Join date : 2012-01-04

PostSubject: Re: Editor - events   Fri Feb 27, 2015 11:06 pm

17. Not yet implemented. Embarassed

_________________

Back to top Go down
View user profile http://the-protectors.webs.com
Zetoo
Bug Catcher
Bug Catcher
avatar

Posts : 334
Join date : 2015-01-28

PostSubject: Re: Editor - events   Sat Feb 28, 2015 5:30 pm

Patrick_the_Winekiller wrote:
16. Just place the nis command:
Code:
<Setvar global=”1”  name=”global_episode”>10</Setvar>
OR
Code:
<Addvar global=”1”  name=”global_episode “>1</Addvar>
Most likely at the end of the NIS file, but anywhere should do (in case of abrupt exit of the game in mid-conversation - power outages, crashes, alt+f4 etc, the save file is not written when the command is called, but rather at the end of the action/conversation anyway).


Also, do I need this in the ACT? Or now I just can ignore the above NIS command? or else?:
Code:
<Action code="ACT_TBL_WMD_1" type="patnis">   
   <Name>Moments Later</Name>
   <Help>Moments Later</Help>
   <NIS>TBL_WMD_1.nis</NIS>

   <Conditions>
      <Condition type="check" id="global_episode" action="eq" value="9"/>
      <Condition type="victory" id="global_episode" action="add" value="1"/>
   </Conditions>

</Action>
Back to top Go down
View user profile
Patrick_the_Winekiller
Devourer of bugs
Devourer of bugs
avatar

Posts : 885
Join date : 2012-01-04

PostSubject: Re: Editor - events   Sat Feb 28, 2015 6:33 pm

Victory and Defeat condition types only work with battle, choice and companion (I think) actions.

_________________

Back to top Go down
View user profile http://the-protectors.webs.com
Zetoo
Bug Catcher
Bug Catcher
avatar

Posts : 334
Join date : 2015-01-28

PostSubject: Re: Editor - events   Sat Feb 28, 2015 10:49 pm

I've tested that combination and works. it is ideal if you want a dialogue in a location for a unique time, and then you want to add +1 to global value so you can uncover other locations and/or new battles/mercenaries, etc.

otherwise, with that nis command inside the NIS only, you will not be able to move on and the message will be permanently available (in other words: end of game!).
Back to top Go down
View user profile
Zetoo
Bug Catcher
Bug Catcher
avatar

Posts : 334
Join date : 2015-01-28

PostSubject: Re: Editor - events   Thu Mar 05, 2015 2:48 am

Tested it all in 0.8.3 and it works just fine. And then I thought:”Let me put some ambushes here”, but I must be doing something wrong. From Ragnar’s pass to The wastes and vice versa. Even put some conditions on AMB... and nothing. As soon as I get this tested out in 0.8.4 I will send it to you Patrick.



Code:
//LOC
<Location code="LOC_RAGNARSPASS">
 <Name>Ragnar's Pass</Name>
 <Description>
 <Paragraph>Ragnar's Pass is a narrow way through the mountains between Khazdhul and the High Elven lands.</Paragraph>
 <Paragraph>Many paths lead from here down into The Wastes - a completely deserted and barren land.</Paragraph>
 </Description>
 <Diplomacy owner="10" hate="0"/>
 <Position x="340" y="250"/>
 <Text x="340" y="210"/>

 <Ambushes>
 <Ambush type="enter" code="AMB_TBL_AMB2"/>
 <Ambush type="leave" code="AMB_TBL_AMB2"/>
 </Ambushes>
 
 <Actions>
 <Action code="ACT_TBL20"/>
 </Actions>
 
 <Conditions>
 <Condition type="check" id="global_episode" action="ge" value="15"/>
 </Conditions>
 
 <Links>
 <Link code="LOC_EHLARIEL" traveltime="6" type="Land">Travel to Ehlariel</Link>
 <Link code="LOC_KHAZDHUL" traveltime="6" type="Land">Travel to Khazdhul</Link>
 <Link code="LOC_THEWASTES" traveltime="10" type="Land">Travel to The Wastes</Link>
 </Links>
</Location>

//AMB
<Ambush code="AMB_TBL_AMB2.amb">
 <Name>Daemon Ambush</Name>
 <Help>An ambush has been spotted.</Help>
 <Description>A large group of Daemons have spotted you. Prepare for battle!</Description>
 <Chances ally="0" friend="0" neutral="50" enemy="100"/>
 <Reward type="crowns" data="20">You find 20 crowns worth of treasure on your attackers.</Reward>

 <Conditions>
 <Condition type="check" id="global_episode" action="ge" value="15"/>
 </Conditions>
 
 <Map code="MAP_TBL_AMB2"/>
</Ambush>

//MAP
<Map code="MAP_TBL_AMB2">
 <Name file="TBL_AMB2"/>
 <Battle victory="standard" points="10" hidden="0" fog="0" level="0" quests="0"/>
 <Side id="0" resources="1" team="0"/>
 <Side id="1" race="11"  resources="1" team="0" ai="7" nohero="1" noretinue="0"/>
</Map>
Back to top Go down
View user profile
Patrick_the_Winekiller
Devourer of bugs
Devourer of bugs
avatar

Posts : 885
Join date : 2012-01-04

PostSubject: Re: Editor - events   Thu Mar 05, 2015 6:43 am

Race 10 has to be your enemy for a 100% chance - since you allied with all races at the beginning (right?), it will never happen (you set allied chance to 0%). When testing ambushes, I set all chances to 100% and then reduce wherever I feel it necessary.

_________________

Back to top Go down
View user profile http://the-protectors.webs.com
Zetoo
Bug Catcher
Bug Catcher
avatar

Posts : 334
Join date : 2015-01-28

PostSubject: Re: Editor - events   Thu Apr 23, 2015 7:46 pm

Is there any maximum number of Action codes inside each LOC?

Code:
//LOC//

 <Actions>
 <Action code="ACT_TAK3"/>
 <Action code="ACT_Lunarion_Shop"/>
 <Action code="ACT_TAK_Library"/>
 <Action code="ACT_TAK_MERC1"/>
 <Action code="ACT_TAK_nis3"/>
 <Action code="ACT_TAK_nis4"/>
 </Actions>

ACT_TAK_nis4 is only triggerd after TAK3.SCN and ACT_TAK_nis3 before TK3.SCN. But I cannot have any mercenaries (ACT_TAK_MERC1) It is like if someone had encripted it... I guess this is a natural barrier? I will have to sacrifice Library or Shop or there is some trick do turn this around?
Back to top Go down
View user profile
Patrick_the_Winekiller
Devourer of bugs
Devourer of bugs
avatar

Posts : 885
Join date : 2012-01-04

PostSubject: Re: Editor - events   Thu Apr 23, 2015 9:15 pm

If you look in version 0.8.3 changelog you can see:
Quote :
*Increased actions per location limit to 32 (was 12)
Therefore, it must be something wrong with your code (ACT_TAK_MERC1.act). When I test something, I usually isolate  the case, since it is easier to spot the problem that way.

EDIT: And yes, I did reach the limit of 12 actions per location in the main campaign.

_________________

Back to top Go down
View user profile http://the-protectors.webs.com
Zetoo
Bug Catcher
Bug Catcher
avatar

Posts : 334
Join date : 2015-01-28

PostSubject: Re: Editor - events   Thu Apr 23, 2015 9:29 pm

It was bad written code indeed… But I am going to remove it anyway (too many troops on Human side… I want to make it a little hard to win.).
Can’t wait for those 12 actions per LOC! Epic!
Another soft question: are you able to set negative years on timeline? I mean is it possible to create a story before Recorded history (I guess this could be useful for TPC main lore + pre historic dragon’s side-quests/mini chapters)?
Back to top Go down
View user profile
Sponsored content




PostSubject: Re: Editor - events   

Back to top Go down
 
Editor - events
View previous topic View next topic Back to top 
Page 2 of 3Go to page : Previous  1, 2, 3  Next
 Similar topics
-
» Stormies Shitty Basic Guide To using Events in Pac 3
» ChaosEdit or Similar Editor
» New WOW Miniatures - Events in Dayton - Nov. 13, 14 and 16
» BABV Upcoming Events in April!
» GamerXA - Caste and Class Editor

Permissions in this forum:You cannot reply to topics in this forum
The Protectors Forum :: Questions and Answers-
Jump to: