vp & achievements
Posted: Tue Mar 07, 2017 2:20 pm
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
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