Home » MODDING HQ 1.13 » Flugente's Magika Workshop » New feature: easily placed extra civilians
Re: New feature: easily placed extra civilians[message #357485 is a reply to message #357453] Mon, 03 June 2019 01:01 Go to previous messageGo to previous message
Kitty

 
Messages:473
Registered:October 2017
Location: Germany
netrunner wrote on Wed, 29 May 2019 18:04

is there any way to check if a grid is occupied? I am trying to spawn some mobs alongside the kingpin assassins when I do by random location some of them dont spawn, I figured is because they are set to spawn in a occupied grid but the createarmedcivilian function doesnt return anything.
the gridnumbers for the bountyhunters and other script-placed civilians are written in the lua-scripts (the number in the brackets, look at flugentes description). as far as I know, you have to check inside the map-editor if a grid-number is free (also to make sure there is no wall, deep water, etc.) . in the "docs"-folder of your JA2 1.13 installation there are two guide for map-editor. when in map-editor and moving mouse, you should see grid-number at the bottom-left of map-editor (picture of this in those guides)
I wouldn't add those armedCivilains of yours at the same place in scripts the bountyhunters of flugentes quest. Try to add the lines needed where the other civilains are.

o = math.random(1, 4)
if o == 1 then CreateArmedCivilain(CivGroup.YOUR_GROUP_GROUP, SoldierClass.SOLDIER_CLASS_ARMY, 15555, hostile )
if o == 2 Then CreateArmedCivilain(CivGroup.YOUR_GROUP_GROUP, SoldierClass.SOLDIER_CLASS_ARMY, 16666, hostile )
.
.
.

Something like this . 15555 and 16666 in the example are gridnumbers I just made up. The "Your Group" has to be defined in CivGroupNames.xml and also has to be added into civGroups in the lua-script, at least, that's what I have done.
Instead of the Bountyhunters rather look at how those blackmarket-guys are added or the d5 merchants whose spawning depends on kingpin to get the idea. If you still want to change bountyhunters look into flugentes description of the bountyhunter-quest (somewhere here under new features), there you'll find details on what he has done and which scripts, xmls are to be change (if I remember correctly, at least quest.lua had also stuff related to this).

I hope this isn't confusing more. Better start with reading flugentes description.

[Updated on: Mon, 03 June 2019 01:33]




How to get: latest 1.13, 7609 and more | 7609 SCI (eng) | Compiling+SVN

I need more details. (Didi Hallervorden)

Report message to a moderator

Master Sergeant
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: New feature: combat jeeps
Next Topic: Ancient feature: sexism, racism, cursing the french and other human relations
Goto Forum:
  


Current Time: Mon Dec 02 07:06:59 GMT+2 2024

Total time taken to generate the page: 0.01190 seconds