vp & achievements

Post Reply
ur1
Lance Corporal - SdKfz 222
Lance Corporal - SdKfz 222
Posts: 21
Joined: Fri Feb 10, 2017 7:28 pm

vp & achievements

Post by ur1 »

I finally got it. Thanks to Pip and Mophead for guiding me on it. And apologies for the language (English and computer). I use the google translator for this...
Now when you conquer a specific vp. You can receive reinforcements. Or anything you can do if possible.
This is a simple example with a dreadnought as reinforcement:


-open the editor
-create a map with several vp.
-Create a group of reinforcements.
-In the plugin "slitherine victory" points creates an achievement in which you must conquer a specific vp (for example vp1) This creates automatically
a file in the "SCENARIOS" folder "MYMAP_AUTOACH.bsf"
-save and close the map.
-look for your reinforcements file in: my games / sanctus and open it.
-copy the line of text in which your unit appears and close the document.
-create a file "MYMAP.BSF"?
-now in the "SCENARIOS" folder, open the document "MYMAP_AUTOACH.bsf" and enter the line that you copied.save
-it should be something like this:

MYMAP_AUTOACH.bsf:





// This is an automatically generated file. Editing this file may result in a loss of data.

FUNCTION ACHIEVEMENT_AUTO_8()
{
int id
if (GetScriptGlobal("Slith_VictoryPoints", "VP#1") == 0)
{

id = PlaceUnit(32, 18, 0, 0, 0, "DREADNOUGHT")
AddVizDelay(10)
AddVizFunctionCall("ShowUIScreen", "BattleHead0", "Anim1", "IDS_AUTO_ACH_4", "BHead0Image:achievement_star")
SetGlobal("gACH_AUTO_8", 1)
return 1
}
return 0
}

FUNCTION DrawScenarioUI_AUTOACH()
{
int g
int y
if (GetCurrentSide() == 0)
{
StartString()
y = GetUIDisplayBottom()
if (y == 0)
{
PrintString("IDS_ACHIEVEMENTS_HEADING")
PrintStringLiteral("\n")
}
PrintString("IDS_ACH_AUTO_8")
PrintStringLiteral(": ")
g = GetGlobal("gACH_AUTO_8")
if (g == 1)
{
PrintString("IDS_DONE")
}
if (g == -1)
{
PrintString("IDS_FAILED")
}
if (g == 0)
{
PrintStringLiteral("-")
}
PrintStringLiteral("\n")

y = Max(y, 90)
RenderString(12, y, 5, "fffee37c", "ff000000")
}
}



I hope I have helped to make more interesting battles for all
ur1
Lance Corporal - SdKfz 222
Lance Corporal - SdKfz 222
Posts: 21
Joined: Fri Feb 10, 2017 7:28 pm

Re: vp & achievements

Post by ur1 »

I did not discover penicillin with this. But some comment would be well ...
Mophead
Corporal - Strongpoint
Corporal - Strongpoint
Posts: 59
Joined: Sun Jan 29, 2017 7:23 pm

Re: vp & achievements

Post by Mophead »

This is good to know.

The Achievement Tool creating ScenarioName_AUTOACH.BSF
and
the Reinforcement Tool creating REINFORCEMENTS0.BSF
certainly helps make much more detailed scenarios.
ur1
Lance Corporal - SdKfz 222
Lance Corporal - SdKfz 222
Posts: 21
Joined: Fri Feb 10, 2017 7:28 pm

Re: vp & achievements

Post by ur1 »

thanks. you are great!
Post Reply

Return to “Sanctus Reach Mods and Scenario Design”