Jump to content


Photo

Spawning points


  • Please log in to reply
7 replies to this topic

#1 temnix

temnix
  • Member
  • 983 posts

Posted 22 August 2017 - 04:55 PM

I can't seem to get the actions for the spawning points to work:

 

SpawnPtActivate(O:Object*)

SpawnPtSpawn(O:Object*)

 

What I'm interested in is getting creatures out of a spawn point. I don't know if it has to be activated first. What kind of object names does it take? If those in the AREs, then, well, I've been writing SpawnPtSpawn("Spawn Point 1"), with activation too, and nothing happens.



#2 K4thos

K4thos
  • Modder
  • 315 posts

Posted 23 August 2017 - 05:25 AM

What kind of object names does it take?

first row (Name) in NI spawn point ARE viewer.

 

I've just tried those functions with INI spawns, using this test INI file:

[locals]

[spawn_main]
events=EVENT1

[EVENT1]
critters=TheTest
interval=10

[TheTest]
spec = AASIM
cre_file = AASIM
spawn_point = [1200.600:14]
ignore_can_see = 1

After setting it up above INI spawn point ignored console commands:

C:Eval'SpawnPtActivate("TheTest")'
C:Eval'SpawnPtDeactivate("TheTest")'
C:Eval'SpawnPtSpawn("TheTest")'

Ctrl+Y the spawned guy results in immediate respawn even after using SpawnPtDeactivate("TheTest").

 

If those commands don't work with ARE spawns either (no idea, never tested it) than they are completely broken.


Edited by K4thos, 23 August 2017 - 05:48 AM.


#3 temnix

temnix
  • Member
  • 983 posts

Posted 23 August 2017 - 05:31 AM

Honestly, I have no idea what this INI testing is. I just know that the engine compiles those actions in a script for "Spawn Point 1," as if this script name (or whatever?) somewhere exists, and likewise for 2, but not for "Spawn Point 0," even though that's what some of the points are called on maps. Or which are the names in the Near Infinity window - what is on the left or what is on the right? Anyhow, "Spawn Point 1" exists in both lists, and I thought that was very nice that spawn points are called the same on all maps. No custom names. So we could manipulate them. But the actions don't work...

 

And while we're on this subject, do spawn points get triggered by a GOODCUTOFF not in the party, like a summoned creature?


Edited by temnix, 23 August 2017 - 11:31 AM.


#4 Miloch

Miloch

    Barbarian

  • Modder
  • 6573 posts

Posted 23 August 2017 - 07:49 PM

As to your last question, it's a good one (meaning I dunno).

 

As to spawn points in general and manipulating them, the engine is very wonky here. Like Willie Wonka-style wonky. Now I don't know exactly what you're trying to do, but if you're in view of a spawn point, it won't ever trigger. It seems to be something that only happens offscreen. You'd think I could be of more help here, but this is one of the (several) aspects of the engine that has always evaded me somewhat.


Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#5 K4thos

K4thos
  • Modder
  • 315 posts

Posted 24 August 2017 - 12:01 AM

As to spawn points in general and manipulating them, the engine is very wonky here. Like Willie Wonka-style wonky. Now I don't know exactly what you're trying to do, but if you're in view of a spawn point, it won't ever trigger. It seems to be something that only happens offscreen. You'd think I could be of more help here, but this is one of the (several) aspects of the engine that has always evaded me somewhat.

INI spawn points don't have this limitation (ignore_can_see = 1) and allows for more stuff than ARE spawn points (basically everything that is possible in ARE actor structure + a way to control if spawn point is active via variable). With INI spawns available using ARE spawn points seems useless to me.

 

I still don't get what is the actual temnix's question here. I really doubt that those functions don't work with properly referenced spawn point Name considering they are used in many scripts in vanilla game - just take a look at BD7200.BCS script and find what exactly is referenced there in BD7200.ARE spawn point structure to figure out how it works.

 

Anyway I've made redmine feature request to extend INI spawns to work with the actions mentioned in this topic.


Edited by K4thos, 24 August 2017 - 05:05 AM.


#6 temnix

temnix
  • Member
  • 983 posts

Posted 24 August 2017 - 04:27 AM

Didn't you start by saying that INI spawn points, whatever they are exactly, don't work with those actions either? I wanted to know if there was a way to get SpawnPtSpawn() to work. Looks like there isn't. I can't look at that script from SoD right now, but it probably uses SpawnPtActivate(), and I have no reason to doubt that one. But for my purposes, getting some monsters to appear rather than just setting up a trigger for the party to set off, only SpawnPtSpawn() would do. I'm sure the problem is not with names, they are straightforward, and "Spawn Point 1" and others from the vanilla game are already accepted by Near Infinity without a warning, even though, curiously, there is no such string in the tlk. So it seems as if "Spawn Point 1" is an object script name (or reference or whatever it would have to be for a spawn point) that already exists. However you assign it, that's the only name there is. I've tried editing an ARE and the name of a spawn point to read "SpawnPoint1", no spaces, in case it matters, but that didn't make it respond to SpawnPtSpawn() any better.

 

Looks like I'm going to have to go with a Monster Summoning.

 

As for friendly birds and such setting off active points, yep, they do that. My birds' allegiance was [PC], green but not controllable directly, well, they made xvarts appear.



#7 K4thos

K4thos
  • Modder
  • 315 posts

Posted 24 August 2017 - 05:49 AM

Didn't you start by saying that INI spawn points, whatever they are exactly, don't work with those actions either?

Correct. I didn't suggest that those functions don't work with ARE spawns though (never used them). I mentioned INI spawns since I found them as better alternative than ARE spawns (regardless if those functions work with them or not), so depending on what you try to achieve this feature may be handy.

 

But for my purposes, getting some monsters to appear rather than just setting up a trigger for the party to set off, only SpawnPtSpawn() would do. I'm sure the problem is not with names, they are straightforward, and "Spawn Point 1" and others from the vanilla game are already accepted by Near Infinity without a warning, even though, curiously, there is no such string in the tlk.

spawn point name has nothing to do with TLK (it's 32 chars array stored in ARE file). Near Infinity probably saves all spawn point names associated with particular ARE, so that it can warn you if you try to reference non-existing spawn point in script.

 

I've tried editing an ARE and the name of a spawn point to read "SpawnPoint1", no spaces, in case it matters, but that didn't make it respond to SpawnPtSpawn() any better.

Now try using SpawnPtActivate and SpawnPtDeactivate. If they will work than case is closed - you found a broken action. Unless it is meant to be used differently - in such case I'm also interested in hearing what is it for.


Edited by K4thos, 24 August 2017 - 05:52 AM.


#8 temnix

temnix
  • Member
  • 983 posts

Posted 24 August 2017 - 09:34 AM

I don't care to test Activate by itself, I don't need it for getting my scoop of monsters. The G3 guide says Spawn works whether the point is activated or not - though I have no clue how they know that unless they've gotten Spawn to perform. Or it could be some official description never tested. I've tried Activate followed by Spawn in the same script, and no monsters popped up, but I wasn't standing on the point, obviously, or else I wouldn't know if this remote start did anything. For all I know Activate may have worked fine for that point.

 

Okay, then. I guess I'm going to have to ask about this INI spawning... But wait, it requires specific coordinates and other details. I'm looking for a universal solution. If I could get "Spawn Point 1" to fire, that would cover all vanilla BG maps with spawn points, and maybe BG2 as well.