Bringing in reinforcements?

Post Reply
SgtBootStrap
Lance Corporal - SdKfz 222
Lance Corporal - SdKfz 222
Posts: 23
Joined: Tue Dec 13, 2016 6:31 pm

Bringing in reinforcements?

Post by SgtBootStrap »

I was hoping to send in a Campaign to the Contest. ;) I would love to have some "reinforcements" be part of it but I can't reproduce the one good attempt I did have So the question is:

Is it required that both sides get reinforcements or can one side get more than 1 set per Match?

When I tried at first, nothing. I then tried to add code to the .BSF and till nothing. So I went back to scratch, built a basic map and units and with very basic reinforce orders it did work. I even moved the .BSF's to the campaign folder and it continued to work. Although I did notice that the Turn #'s in the .BSF's were not the same in the exported code.

Example: IN a 10 round Match the code exported this, if (GetTurn() == 17), which I then simply edited to what I wanted and it seem to work.

I then redid my first attempt to simplify, everything looks the exact same, for files and their placement but still NADA...

Anyone have any idea how reinforcements actually work ???

Sincerely, Confused :)
Mophead
Corporal - Strongpoint
Corporal - Strongpoint
Posts: 59
Joined: Sun Jan 29, 2017 7:23 pm

Re: Bringing in reinforcements?

Post by Mophead »

_\Warhammer 40000 Sanctus Reach\Campaigns\STORMCLAW\SCENARIOS\Fortress26.BSF

Look at that .BSF file. Reinforcements (unit placement) at turns; 4, 8, 16, & 24. I just model after those examples. I'm not sure how it works in the editor, I think there is a Tool for this too.

If you get the coordinates and the tile is clear, the scripted unit placement works.

Code: Select all

id = PlaceUnit(37, 16, 0, 0, 0, "LANDSPEEDER");  //37,16 is tile coord.  not sure what rest are.
SetAttrib(id, "SquadName", 24);  //  "24" is a Valid Squad Name: IDS_UNIT_24, "Ozurr", (Text3.txt)
SetupStartAbilities(id, 0);  // This will assign abilities; new units with -1 XP in Squads.cvs are auto-leveled
If you are using custom units, a couple .BSF files might be needed too.
SgtBootStrap
Lance Corporal - SdKfz 222
Lance Corporal - SdKfz 222
Posts: 23
Joined: Tue Dec 13, 2016 6:31 pm

Re: Bringing in reinforcements?

Post by SgtBootStrap »

Thanks. I will post the in-game editor exporter output. It does seem to do what is needed but for some reason, no re-reinforcements arrive in my Campaign and starting over after a heavily Customized Map was made, does not really have any appeal. ;) Thanks and I will simply try again. :)
Mophead
Corporal - Strongpoint
Corporal - Strongpoint
Posts: 59
Joined: Sun Jan 29, 2017 7:23 pm

Re: Bringing in reinforcements?

Post by Mophead »

I got the editor tool to work, no use of the advanced options:
1) set units
2) bring up reinforcement tool window
3) Three settings to adjust:
Side 0 (Space Wolves) // Side 1 (Goffs)
Group //there are 7 AI groups, reinforcement groups could be limited too
Arrive // turn, I had three groups of arrivals at turns; 0, 2, & 4. These were my 1st, 3rd, & 5th opportunities to move my units.

It works like the AI tool. Adjust settings in the tool window and:

4) Assign reinforcement groups by clicking on the placed units [with tool window open and set to what you want].

You should be able to use most if not all of what you have, the; terrain, tile, object placements, and any other settings that you adjusted.

* edit I'm having problems with abilities being assigned to leveled-up units that spawn from the reinforcement tool.
SgtBootStrap
Lance Corporal - SdKfz 222
Lance Corporal - SdKfz 222
Posts: 23
Joined: Tue Dec 13, 2016 6:31 pm

Re: Bringing in reinforcements?

Post by SgtBootStrap »

Thanks. I did get them to spawn now but I have an issue to get the arrival TEXT to appear. A minor thing for sure but it is the little things right.

So the id:placeunit values(36,35 = map coords, and 0,1,0) are Side/Group/Arrive? (as in arrive Turn?)

That is good very to know and will be useful in the .BSF script file. :)
Mophead
Corporal - Strongpoint
Corporal - Strongpoint
Posts: 59
Joined: Sun Jan 29, 2017 7:23 pm

Re: Bringing in reinforcements?

Post by Mophead »

Using the reinforcement tool, in the editor, and also using the PlaceUnit in the Scenario.bsf are two different approaches for me.

Using the tool, I had no Scenairo.bsf file -no need for one.

I just haven't gotten around to playing with the advanced -> export file feature in the tool. I'm a little behind you on that.

I think you have most of this, adding the following for anyone else reading too.

The PlaceUnit Function is defined in:
_\Warhammer 40000 Sanctus Reach\Data\scripts\Functions.BSF
FUNCTION PlaceUnit(x, y, facing, side, team, type)

This function is nested in a turn conditional, < if (GetTurn() == -1) >, in the StarTurn function, in the Scenario.BSF file.

There is also:

Code: Select all

//add a unit to the map.  The string is the unit name.  If recycle is 1, attempt to reuse ids of removed or dead units.  If the tile is not clear the unit is not added.  Returns the id of the new unit, or -1 if there was a problem
AddUnit(x, y, side, typeString, [recycle])
_\SANCTUS\AUTODOCS\BATTLESCRIPT.TXT
See:
_\Warhammer 40000 Sanctus Reach\Campaigns\TUTORIAL\SCENARIOS\GreenTideGreyFog.BSF
SgtBootStrap
Lance Corporal - SdKfz 222
Lance Corporal - SdKfz 222
Posts: 23
Joined: Tue Dec 13, 2016 6:31 pm

Re: Bringing in reinforcements?

Post by SgtBootStrap »

Thanks. Was very curious about that, Facing? Who would have guessed. Should read more Function files I guess. ;)
Post Reply

Return to “Sanctus Reach Mods and Scenario Design”