Custom Map Questions for knowledgeable Modders


(ajlsunrise) #21

SobGroup_SetStance is “out of scope” (undefined) in the level file. That’s why it crashes.


(Paradoxnrt) #22

Should I somehow define ‘SobGroup_SetStance’? In what file/location should it be put?

Any info will help me take over the world…I mean will be appreciated!


(ajlsunrise) #23

If you notice, there’s two different “add a ship to a SobGroup” functions, createSOBGroup and SobGroup_Create.

By out-of-scope I mean this:


(Paradoxnrt) #24

Well, I guess nobody knows how to insert hostile neutral ships in a ‘guard mode stance’. That bites!

Thanks for trying though guys, I appreciate the effort!


(jelrak) #25

Have you tried simply making them a new race and have them patrol an area? You would have to likely provide them with a mothership, but other than that…?


#26

There is a file that denotes which ships the ai will use, or so.ething of that sort. Check the ai behaviors and make sure the ai are able to control the ship. That’s the solution I had to do when I first encountered this.

If the desired ship is listed in the file (I don’t remember the path or file name, I uninstalled the game) try it on a different map and see if the ai works. Do post results, even if everything is the same.


(ajlsunrise) #27
Since HSArena is a 6 player map, change the `-1` here to `6`: `addSquadron("Guard", "Hgn_Dreadnaught", {1000, 200, 400}, -1, {0, 0, 0}, 1, 0)`

Then add CPU_Enable(6, 0) to the Init_GuardMapVolume function.

Edit: nevermind, this doesn’t work…


(Paradoxnrt) #28

Yup, tried that. If you give the addSquadron command a faction setting of 1 = the second slot in a multiplayer game gets the Dreadnaught.

I want it so NO players (human or AI) get control of the Dreadnaught.

Anyway, since nobody knows how to do it (or can think of ever seeing it done) = I am starting to think it isn’t possible!


(Taiidan Republic Mod) #29

I thought this was possible, but perhaps player -1 is hard coded to be non-aggressive…


(Herbyguitar) #30

@Nathanius What did you do to get the Dom Carrier to patrol and attack in one of the STC maps?
Maybe he’ll see this…


(Nathanius) #31

@herbyguitar that was Stargazer’s stc_keeper script. This is how he explained it in the file:

----------------------------------------------------------------------------------------------------
-- KEEPER ROUTINE - "make them harvestable, but you have to kill the Ogre first"
----------------------------------------------------------------------------------------------------
-- This routine will update Keepers. Keepers are ships, which defend an area on the map. They are
-- defined in the *.level files.
-- Keepers will scan for enemies within the 'KeeperKEEP_iRetaliationRange', which is defined in
-- STC_SETTINGS.lua along with other Keeper variables. If there are any enemies, the Keeper will
-- engage and attack them. If the Keeper moves outside his volume (defined in the *.level file),
-- it stops attacking and moves back to the volume. If the Keeper is not under attack anymore and is
-- inside his volume, it regenerates. If health is below a certain percentage in battle, the Keeper
-- starts a kamikaze attack at his attackers (ignoring the Keeper volume) or will change sides or
-- battle until death.
-- 
----------------------------------------------------------------------------------------------------
-- FOR THE LEVEL FILES:
-- 
-- To add Keepers to a map, you need a global SobGroup for all Keepers first:
--
--                          createSOBGroup("sob_AllKeepers")
--
-- To add Keepers to a map use the following lines:
-- 
-- addSphere("vol_Keeper1", {0, 0, 0,}, 5000)
-- addSquadron("sqd_Keeper1", "Kpr_Destroyer", { 0, 0, 0, }, -1, { 0, 0, 0, }, 0, 0)
-- createSOBGroup("sob_Keeper1")
-- addToSOBGroup("sqd_Keeper1", "sob_Keeper1")
-- addToSOBGroup("sqd_Keeper1", "sob_AllKeepers")
-- 
-- We start counting Keepers from 1. So the first Keeper has to be 'Keeper1', the second 'Keeper2'
-- and so on.
-- The lines above will create 'Keeper1'. 'Keeper1' will stay inside of 'vol_Keeper1'. The volume
-- is a shpere with radius 5000 at position {0, 0, 0,}. 'Keeper1' is a "Kpr_Destroyer", which is
-- spawned at { 0, 0, 0, } and owned by player "-1" (it's a map object).
----------------------------------------------------------------------------------------------------

(ajlsunrise) #32

This line should actually read addToSOBGroup("Guard", "Volume1Guards")


(Herbyguitar) #33

Hmmm. That’s odd. It still works. Any thoughts Nate (@Nathanius)? …wish SG was here…


(Paradoxnrt) #34

Okay, I’m back. I’ll give this a try tonight and let you guys know how it works out.


(Nathanius) #35

The script works, you have to SOB group the ships and then specifically spell out what you want them to do. Otherwise they remain neutral and it doesn’t work.

I’ve not got time to go through and understand it to re-explain it here though sorry


(Paradoxnrt) #36

I’ve edited the .Level file, and it does insert the ships as faction -1 (map object)…but one question remains?

What file do I need to edit to insert ‘KeeperKEEP_iRetaliationRange’? There IS NO STC_SETTINGS.lua file! Without the ‘KeeperKEEP_iRetaliationRange’, the Dreadnaught just passively sits there!

Am I supposed to make this .lua file? Where am I supposed to put it? Hopefully someone knows the last piece of this puzzle…


(Nathanius) #37

This is our own settings file for all our scripts (STC = Star Trek Continuum) , you can replace the KeeperKEEP_iRetaliationRange with the actual retaliation range :slight_smile:

I think


(Paradoxnrt) #38

What I mean, I’ve inserted all the above entries in my *.LEVEL file (as directed)…but in what file would I insert the ‘KeeperKEEP_iRetaliationRange’?

That is the last piece of the puzzle…I don’t know where it goes. Or should I make a file to insert it? If so, where is it located and what is it called?

Any help on this last piece would be greatly appreciated.


(Taiidan Republic Mod) #39

I think he means just replace KeeperKEEP_iRetaliationRange with a number (say 5000) which is the range at which keepers will attack things. In other words anything within 5000 they would attack, anything farther away they would ignore.


#40

Player -1 cannot be made to be hostile or capturable AFAIK. You have to make it a different player, such as 1, 2, 3, 4, etc. This is awkward in multiplayer since you will have to remember to make that player slot a CPU player each time. Should work okay in singleplayer however.

[edit]

I just reread the whole thread. Didn’t realize someone was able to get it to work. Never mind then.