VP Plugin

Tech support for Battle Academy

Moderators: Slitherine Core, BA Moderators

Merr
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 903
Joined: Mon Aug 16, 2010 2:00 pm

Post by Merr »

junk2drive wrote:If you can make sense of my posts above, I've tried it with every combination of flags, not just one. I swear I got it to work once, but all of my scenarios have bsf files instead of this. I'm pretty sure the VP tool works fine for capturing enemy or neutral flags, just not defend scenarios.
I made sense of it all ... and discovered other strange things.

Ok ... I did as instructed ...

1. Start new map.
2. Setup one VP, set to SIDE 0.
3. Set DEFEND to read 1 VP.
4. Set TURN LIMIT to 10.
Result ... game ended without a shot ... I win.

Reason ... In the code, the EndBattle was reached because VictoryCapture was met ... meaning, it was set to ALL or 0 ... you win because this is the first "check" in the code order.

Now, lets do as Pip suggested ... Set CAPTURE to a higher value, above our defend number, lets use 2.
Ok, with this only change we can now get by the first turn .. yipee!
But ... when the turn limit is reached ... we lose, even though we met the DEFEND condition of holding our 1 VP.

Reason ... same as above ... The VictoryCapture was the first line of code (first check) and it was NOT met ... you lose.

So, I added a quick IF/ELSE grouping that skipped the CAPTURE logic if it was set to less than 1 ... this worked ... yippee.

Now for more bad news ... The AI doesn't appear to understand 1 VP , even though that VP is set as HOSTILE, it simply ignores it.
If you use 2 VP's, one set for each side, it will still sit on it's hands, despite any aggression level value.

The only way I was able to get the AI off it's butt was to use 3 VP's minimum ;
1 VP on side 0.
1 VP as neutral.
1 VP on side 1.

In the cases above, I had CAPTURE set to 2.

Anyway ... it might be working correctly ... You know, if we each had 1 VP and I knew that for you to win you had to capture my VP, well come and get it ... dare ya. :wink:
Merr
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 903
Joined: Mon Aug 16, 2010 2:00 pm

Post by Merr »

I just thought of something, but first ....

The way the code was written it means that when you have BOTH capture and defend selected, EDIT : meaning it will never get past capture, so defend should never be selected?
Now, this it what I was thinking .... If Pip or Ian decides to write the logic over again, then I have a suggestion before you guys do this ...

You have the potential of expanding Victory Conditions to more than just WIN/LOSE.
Perhaps combining all the Victory parameters that are set into a final victory based on levels.

We've all seen this in other games ... yes, you got it ...
1. Decisive
2. Marginal
3. Draw

Just an idea ... Thanks for listening.
pipfromslitherine
Site Admin
Site Admin
Posts: 9925
Joined: Wed Mar 23, 2005 10:35 pm

Post by pipfromslitherine »

It's a great thought. I believe we talked about something similar with regard to MP games with time limits, so it might kill 2 birds with 1 stone.

Cheers

Pip
junk2drive
BA Moderator
BA Moderator
Posts: 1478
Joined: Sun May 23, 2010 4:47 pm
Location: Arizona USA -7GMT

Post by junk2drive »

pipfromslitherine wrote:The numbers are basically how many you need to hold to win, and how many you need to hold before you lose, respectively. So I think you would need to set capture to 2 and defend to 1 in this case. I know it seems a little odd, but it does make sense if you think about it :).

If that doesn't work, then I guess this case was one I didn't consider when I did the code, and so I can update the logic.

Cheers

Pip
Back in October you posted this. I couldn't get it to work. 1.5.1 states you fixed something so I tried again. A couple of units on both sides, 2 friendly flags held by the friendly side, no flags on the enemy side.
If I set capture 0 defend 2 the game ends on start stating 2\2 on the screen.
If I set it to capture 3 defend 2, the game runs the full turns and says I failed at 2\3
You can call me junk - and type that with one hand.
Post Reply

Return to “Battle Academy : Tech Support”