VP Plugin
Moderators: Slitherine Core, BA Moderators
-
junk2drive
- BA Moderator

- Posts: 1478
- Joined: Sun May 23, 2010 4:47 pm
- Location: Arizona USA -7GMT
VP Plugin
I set up a test battle with US and Japan with neutral flags. I let Japan take the flags and they change to hidden. Instead of adding my country marker list I tried adding this
if(side == 1)
{
StartWorkString() ;
PrintWorkStringLiteral("victory_marker_") ;
PrintWorkStringInt(nation) ;
if(ret == 1)
{
ShowEffectMarker(marker, x, y, GetWorkString(), 0, -1, "FF00B4FF") ;
}
else
{
ShowEffectMarker(marker, x, y, GetWorkString(), 0, -1, "FFFF4E00") ;
}
}
below if side = 0 but that didn't work.
if(side == 1)
{
StartWorkString() ;
PrintWorkStringLiteral("victory_marker_") ;
PrintWorkStringInt(nation) ;
if(ret == 1)
{
ShowEffectMarker(marker, x, y, GetWorkString(), 0, -1, "FF00B4FF") ;
}
else
{
ShowEffectMarker(marker, x, y, GetWorkString(), 0, -1, "FFFF4E00") ;
}
}
below if side = 0 but that didn't work.
-
pipfromslitherine
- Site Admin

- Posts: 9925
- Joined: Wed Mar 23, 2005 10:35 pm
-
junk2drive
- BA Moderator

- Posts: 1478
- Joined: Sun May 23, 2010 4:47 pm
- Location: Arizona USA -7GMT
-
pipfromslitherine
- Site Admin

- Posts: 9925
- Joined: Wed Mar 23, 2005 10:35 pm
-
junk2drive
- BA Moderator

- Posts: 1478
- Joined: Sun May 23, 2010 4:47 pm
- Location: Arizona USA -7GMT
In the editor you have the sideicon flags in the UI. Tooltip says "side id for side 0" If you use other than the standard 6 flags, the plugin will not show the 3D flag on the map.
I can script flags to show correctly, just not with the plugin. I tried placing a copy of the plugins folder in my campaign and adding the text to the script but that didn't help. Where should the folder go?
I can script flags to show correctly, just not with the plugin. I tried placing a copy of the plugins folder in my campaign and adding the text to the script but that didn't help. Where should the folder go?
-
pipfromslitherine
- Site Admin

- Posts: 9925
- Joined: Wed Mar 23, 2005 10:35 pm
-
junk2drive
- BA Moderator

- Posts: 1478
- Joined: Sun May 23, 2010 4:47 pm
- Location: Arizona USA -7GMT
I gave up trying to get side7 and side8 to show the flags.
Using the VP UI I place a side 0, USA flag inside the USA control area. I want side 1 to take the flag within 30 turns.
I set owner to 0, place at xx,yy
Below I set capture to 0, defend to 1, turns 30, AI team 0 to take the flag.
When I start the battle, it says objective completed.
Thinking I had it backwards, I changed to capture 1, defend 0, still the same.
Using the VP UI I place a side 0, USA flag inside the USA control area. I want side 1 to take the flag within 30 turns.
I set owner to 0, place at xx,yy
Below I set capture to 0, defend to 1, turns 30, AI team 0 to take the flag.
When I start the battle, it says objective completed.
Thinking I had it backwards, I changed to capture 1, defend 0, still the same.
-
pipfromslitherine
- Site Admin

- Posts: 9925
- Joined: Wed Mar 23, 2005 10:35 pm
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
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
-
junk2drive
- BA Moderator

- Posts: 1478
- Joined: Sun May 23, 2010 4:47 pm
- Location: Arizona USA -7GMT
That works.
I couldn't see the flag but knew roughly where is was. Starting error is cannot find victory marker 8, is it in the anim folder? Then when the enemy takes it I get cannot find victory marker 7, is it in the anim folder?
I have the modded s4f and dds that works when I make a scenario.bsf in the anim folder. I just doesn't work with this.
I think I need to be able to put the Plugins folder or Slith_VictoryPoints folder or the UI folder or the Slith_VictoryPoints.bsf on my campaign so that I can add nation 7 and 8 to the bsf.
I couldn't see the flag but knew roughly where is was. Starting error is cannot find victory marker 8, is it in the anim folder? Then when the enemy takes it I get cannot find victory marker 7, is it in the anim folder?
I have the modded s4f and dds that works when I make a scenario.bsf in the anim folder. I just doesn't work with this.
I think I need to be able to put the Plugins folder or Slith_VictoryPoints folder or the UI folder or the Slith_VictoryPoints.bsf on my campaign so that I can add nation 7 and 8 to the bsf.
-
pipfromslitherine
- Site Admin

- Posts: 9925
- Joined: Wed Mar 23, 2005 10:35 pm
-
pipfromslitherine
- Site Admin

- Posts: 9925
- Joined: Wed Mar 23, 2005 10:35 pm
OK - well it seems to work for me. Here is what I did.
- created a map with VPs for each side. Made the sides 7 and 8 (which don't have markers etc for them). Means the VPs can't be seen.
- create the ANIM folder in my custom campaign. Copy in the US victory marker
- change the victory marker to point to renamed textures
- renamed the victory marker file to $victory_marker_7.s3f for side 7, and _8 for side 8
- works!
Hope that helps
Cheers
Pip
- created a map with VPs for each side. Made the sides 7 and 8 (which don't have markers etc for them). Means the VPs can't be seen.
- create the ANIM folder in my custom campaign. Copy in the US victory marker
- change the victory marker to point to renamed textures
- renamed the victory marker file to $victory_marker_7.s3f for side 7, and _8 for side 8
- works!
Hope that helps
Cheers
Pip
-
junk2drive
- BA Moderator

- Posts: 1478
- Joined: Sun May 23, 2010 4:47 pm
- Location: Arizona USA -7GMT
-
pipfromslitherine
- Site Admin

- Posts: 9925
- Joined: Wed Mar 23, 2005 10:35 pm
Not sure what you mean. The only gotcha seems to be that if you want a pure defend mission (that is, you can't ever win by capturing all the flags) then set the capture number to greater than the number of flags that you place. It would be better to have an option for it, but I would need to be very careful not to break any existing missions 
Cheers
Pip
Cheers
Pip
-
junk2drive
- BA Moderator

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

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

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

- Posts: 1478
- Joined: Sun May 23, 2010 4:47 pm
- Location: Arizona USA -7GMT
You're not crazy ... I tried it ... doesn't work, game over I win.junk2drive wrote:Make a map or a blank one. Put some units on each side. Open the VP tool. Put one flag on side 0 and make it work so that side 0 has to defend that flag for x number of turns.
Must be something in the logic when you have only 1 VP ... perhaps not meant to play with 1 VP ... but that doesn't sound right either
-
junk2drive
- BA Moderator

- Posts: 1478
- Joined: Sun May 23, 2010 4:47 pm
- Location: Arizona USA -7GMT
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.
You can call me junk - and type that with one hand.
