How to open .BSF file

orgit
Lance Corporal - Panzer IA
Lance Corporal - Panzer IA
Posts: 14
Joined: Wed Oct 23, 2019 10:37 am

How to open .BSF file

Post by orgit » Sat Oct 26, 2019 6:27 am

Hello everyone,
I can not find a solution, I would like to see campaign script, most of all AI script (and how they works) but I do not know how to open .bsf file, and so have the possibility to edit them.
Can you help me?.
Waiting for a reply, kind regards.

orgit
Lance Corporal - Panzer IA
Lance Corporal - Panzer IA
Posts: 14
Joined: Wed Oct 23, 2019 10:37 am

Re: How to open .BSF file

Post by orgit » Mon Oct 28, 2019 3:19 pm

Hello,
I have found a post by Paul59 talking about a "SCENARIOTEMPLATE.BSF" that he has found in field of glory II files, but that seems it is not present in sanctus reach files.
Is there a chance to find a copy somewhere?.
Thanks.

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

Re: How to open .BSF file

Post by pipfromslitherine » Mon Oct 28, 2019 3:25 pm

The BSF files are specific to each game, so you are going to want to look at the Sanctus files if you want to look at the Sanctus functionality :)

You can open them in any text editor, we recommend Notepad++ as per here: http://www.slitherinebravo.net/GameWiki ... gine#tools

The documentation is somewhat spread across this wiki, plus the BA2 and Archon wikis:

https://sites.google.com/site/battleacademy2/
http://archonwiki.slitherine.com/index.php/Main_Page

That Sanctus scripts are not as mod-friendly as some, but I am happy to help if I can!

Cheers

Pip
follow me on Twitter here

orgit
Lance Corporal - Panzer IA
Lance Corporal - Panzer IA
Posts: 14
Joined: Wed Oct 23, 2019 10:37 am

Re: How to open .BSF file

Post by orgit » Mon Oct 28, 2019 3:40 pm

I have just found the solution, many thanks for your reply in any case.

orgit
Lance Corporal - Panzer IA
Lance Corporal - Panzer IA
Posts: 14
Joined: Wed Oct 23, 2019 10:37 am

Re: How to open .BSF file

Post by orgit » Mon Oct 28, 2019 3:59 pm

Well, I have seen the script of the first mission stormclaw....and it is not an easy task.

I have already designed a map and placed unit (without using script) but I need some help:

1) in the "custom AI data dialog" under "target AI point" it is possibile to set a number. But I do not know what is it for;
2) when you set a target point a yellow triangle appear, I had set some of them,but how can I delete?;
3) from my sw units I can see up to 15 tiles in each direction (included enemy units), but I do not know how to extend the fog of war;
4) I have set a VP16 (in total there are 3 VP) and I have set 9 orks units (team 0) to attack (seek and destroy 16) the VP16, but only one unit try to attack, all the other units moves up and down but without find the place to attack.

Any help, please.

orgit
Lance Corporal - Panzer IA
Lance Corporal - Panzer IA
Posts: 14
Joined: Wed Oct 23, 2019 10:37 am

Re: How to open .BSF file

Post by orgit » Mon Oct 28, 2019 4:11 pm

I have tested one more time.
if I put enemy units quite close to my units (3 tiles away) they see my unit and attack them, the others enemy unit (farther than the privious one) start to goes up and down without finding my units that are one tile far from the VP16, and I have set all enemy unit as team 0,they have to seek and destroy, "target AI point":16.

I would really appreciate any help.

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

Re: How to open .BSF file

Post by pipfromslitherine » Mon Oct 28, 2019 5:39 pm

That is a ton of questions! I will try and answer them, but you are likely going to need to dig into the docs more if you want to do a ton. As I say, the scripts for Sanctus are not as mod friendly as most of our games, so you may need to dig a little deeper to find out what is going on.

1 The value is AI flags, this is used by the AI to make choices. Check out the functions AI_GetTeamMovementGrouped and like in SCRIPTS/AITOOLS.BSF
2 You cannot delete an AI point, they always exist.
3 To change visibility you would need to have a custom squads.csv file in your campaign and change the LOS value for the unit(s)
4 You would need to debug what is going on I am afraid. I didn't write the scripting for Sanctus, but from what I can see some of the AI decision making happens in the mission scripts. You may need to look at the CORE/AI.BSF and determine what is going on.

Sorry I can't be more help! Modding Sanctus is quite an endeavor unfortunately.

Cheers

Pip
follow me on Twitter here

orgit
Lance Corporal - Panzer IA
Lance Corporal - Panzer IA
Posts: 14
Joined: Wed Oct 23, 2019 10:37 am

Re: How to open .BSF file

Post by orgit » Mon Oct 28, 2019 6:03 pm

Thanks for your prompt reply.
I will try.

Bye.

orgit
Lance Corporal - Panzer IA
Lance Corporal - Panzer IA
Posts: 14
Joined: Wed Oct 23, 2019 10:37 am

Re: How to open .BSF file

Post by orgit » Tue Oct 29, 2019 8:43 pm

I have read some of the scenario guide by Paul59.
I have tried to write a script and of course I got an error.
What I would like to achieve is : enemy units (team 1) attack victory point 16.
Here is the script:
Immagine.jpg
Immagine.jpg (204.71 KiB) Viewed 1529 times
I have missed part of the script but I do not know wich part.

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

Re: How to open .BSF file

Post by pipfromslitherine » Tue Oct 29, 2019 11:03 pm

You will need to tell me the error :)

Cheers

Pip
follow me on Twitter here

orgit
Lance Corporal - Panzer IA
Lance Corporal - Panzer IA
Posts: 14
Joined: Wed Oct 23, 2019 10:37 am

Re: How to open .BSF file

Post by orgit » Wed Oct 30, 2019 7:04 am

Ops..sorry.

Error:
Script Error in C:/Users/pc/Documents/MyGames/SANCTUS/CAMPAIGNS/MYCAMPAIGN/SCENARIO/MISS01.BSF:
Failed to find variable MoveTeamCoord: Did you forget to predefine it?
Context: FUNCTION StartTurn

MoveTeamCoord(1,1,-1,-1,8);
}
else
{
MoveTeamCoord(1,1,32,27,16);
}
}
}

That is it.

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

Re: How to open .BSF file

Post by pipfromslitherine » Wed Oct 30, 2019 2:39 pm

MoveTeamCoord is likely a user defined function, so you will need to include the appropriate script that defines it. E.g.

#Include "Functions.bsf"

should do it.

Cheers

Pip
follow me on Twitter here

orgit
Lance Corporal - Panzer IA
Lance Corporal - Panzer IA
Posts: 14
Joined: Wed Oct 23, 2019 10:37 am

Re: How to open .BSF file

Post by orgit » Wed Oct 30, 2019 8:44 pm

Thanks for your reply.
There is something wrong somewhere, my script is composed of just few lines, but I got this new error:


Error:
Script Error in C:/Users/pc/Documents/MyGames/SANCTUS/CAMPAIGNS/MYCAMPAIGN/SCENARIO/MISS01.BSF:
Failed to find variable IsProjWeapon:: Did you forget to predefine it?
Context: FUNCTION PrintAmmoType

if (IsProjWeapon (me,weapon) == 1)
{
if (HasHellfireAmmo(me) == 1)
{
PrintStringLiteral("\n");
PrintStringLiteral(<img=shot.dds>");
PrintStringLiteral(" ");
PrintString("IDS_SANCTUS_ABILITY_HELLFIREAMMO") ;
}
if (Has

As I said I just want enemys units to attack victory point 16.
I think I can not do it. :roll:

orgit
Lance Corporal - Panzer IA
Lance Corporal - Panzer IA
Posts: 14
Joined: Wed Oct 23, 2019 10:37 am

Re: How to open .BSF file

Post by orgit » Thu Oct 31, 2019 9:23 am

Thi is the script:
Immagine.jpg
Immagine.jpg (206.48 KiB) Viewed 1467 times

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

Re: How to open .BSF file

Post by pipfromslitherine » Thu Oct 31, 2019 3:34 pm

It may be that Functions.bsf requires another file that it does not include. It might be simpler to just steal the contents of the function if it is the only one you want to experiment with. Remove the include line, then add

FUNCTION Orgit_MoveTeamCoord(side, team, x, y, aggr)
{
int k ;

// coord flag
k = 1 << 24 ;
// coords
k = k | x ;
y = y << 8 ;
k = k | y ;

SetTeamData(side, team, 0, k) ;
SetTeamData(side, team, 1, 1) ;
SetTeamAggression(side, team, aggr) ;
}

to your script, then change the calls to MoveTeamCoord to Orgit_MoveTeamCoord.

Cheers

Pip
follow me on Twitter here

orgit
Lance Corporal - Panzer IA
Lance Corporal - Panzer IA
Posts: 14
Joined: Wed Oct 23, 2019 10:37 am

Re: How to open .BSF file

Post by orgit » Thu Oct 31, 2019 6:04 pm

Great Pip!,
I have not got any more error, thanks for your help....... , but the fact is that I can't notice a big difference with this script.

I mean, I have got 1 unit distant 3 squares on the left hand side of my unit and this one advance and attacks.

The other 2 enemy units on the left hand side distant 9 squares from VP16 and the other 2 on the right distant from 6 to 7 squares and other 2 enemy units to the north distant from 9 to 10 squares from VP16, they goes around without attacking VP16 and havig difficulty in find my 2 troops.

Just one enemy unit on turn 5 as found one of my unit.

Is it do to game mechanics or the script can be improved?

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

Re: How to open .BSF file

Post by pipfromslitherine » Thu Oct 31, 2019 8:14 pm

Each game's AI works differently, and so if you want to really dig down into the AI and how to make it behave in a specific way you would need to read through the AI script for the game (in CORE/AI/AI.BSF). Not a trivial task to be sure!

Cheers

Pip
follow me on Twitter here

orgit
Lance Corporal - Panzer IA
Lance Corporal - Panzer IA
Posts: 14
Joined: Wed Oct 23, 2019 10:37 am

Re: How to open .BSF file

Post by orgit » Thu Oct 31, 2019 8:41 pm

If I can ask a more question, could you please explain the script you have sent it and why have you added Orgit to that function?

Thanks a lot Pip.

Bye.

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

Re: How to open .BSF file

Post by pipfromslitherine » Fri Nov 01, 2019 3:14 pm

I just copied the function that you were calling (MoveTeamCoord) and appended Orgit_ to the front of the name so that it was marked as being one you created. It is just the function name, no more.

Cheers

Pip
follow me on Twitter here

orgit
Lance Corporal - Panzer IA
Lance Corporal - Panzer IA
Posts: 14
Joined: Wed Oct 23, 2019 10:37 am

Re: How to open .BSF file

Post by orgit » Tue Nov 05, 2019 4:27 pm

Hi,
In the Function DoDropPod the Dreadnought is identified by the id (15, 15, 0, 0, 0 "dreadnought"). Where can I find the other unit id?.
Thanks.

Post Reply

Return to “Sanctus Reach Mods and Scenario Design”