|
Post by Aves Dominari on Oct 4, 2012 19:33:55 GMT -5
All questions related to cataclysm_spawning.xt and related documents, should they ever come to be.
My question is this. I know that your other scenarios are somewhat random with enemy placement (Exodus and Area 51 both have at least semi-random enemy spawning and placement), but I was wondering if there's any way to spawn a random Entity like you can items from a list through the RAW code.
|
|
|
Post by Kyzrati on Oct 4, 2012 20:38:41 GMT -5
Ah, good point. I simply made Cataclysm moddable, and Cataclysm didn't spawn random entities. Currently there's no way to do this, and I'll try to add it before R8.
One way to spawn random entities (and do all kinds of other crazy stuff) is to create a prop and give it a special ability that has that effect--or even create an entity that spawns other entities--but special_abilities.xt might be tough to mod without a guide since the huge amount of explanation reside in the source for now. (The system is straightforward and simple to use, but there's a lot to know before that becomes easy.) Also: My working version has an even better way to handle randomization of multiple effects through abilities (for example spawning from a list), but it wouldn't be as easy to control as a spawning.xt script.
|
|
|
Post by Aves Dominari on Oct 4, 2012 20:59:16 GMT -5
The most I could come up with was one entity that had a chance to become another one when it was created - this would give you some variation in skill with a few custom entities, and maybe each entity had an ability that gave them appropriate equipment when the game started. Not sure if this would be feasible; let me go look at special_abilities.xt and see if you have anything similar I could base it off of.
|
|
|
Post by Kyzrati on Oct 4, 2012 21:11:10 GMT -5
I didn't do much of that yet among the abilities, though it's certainly possible. I've added support for multi-effect abilities with adjustable weighting for each effect--this'll be perfect for controlled spawning of different entities and will come with the official modpack.
|
|
|
Post by Kyzrati on Oct 7, 2012 20:06:40 GMT -5
Ah, good point. I simply made Cataclysm moddable, and Cataclysm didn't spawn random entities. Currently there's no way to do this, and I'll try to add it before R8. Added this yesterday, it'll be in R8.
|
|
|
Post by Aves Dominari on Oct 9, 2012 12:02:42 GMT -5
Awesome :D
|
|
|
Post by draxis on Oct 22, 2012 18:08:10 GMT -5
Would it be possible to, in 8.1, make [SPAWN_ENTITIES] with a negative argument able to make zero spawns?
|
|
|
Post by Kyzrati on Oct 22, 2012 19:57:18 GMT -5
Hm, that was a bit of a dilemma when I first wrote it, since it could be 0~max or 1~max, depending on what you want. I went with 1~max since I had to choose one and generally wanted at the very least *one* object. I'll look into a different way to increase the range to include 0.
EDIT: Okay, I've changed it to do 0~X for 8.1. 0-based it is. ([SPAWN_ITEMS] will also be 0-based.)
|
|
|
Post by Aves Dominari on Oct 22, 2012 20:23:59 GMT -5
Would it be possible to, in 8.1, make [SPAWN_ENTITIES] with a negative argument able to make zero spawns? Just out of curiosity, why would you want that?
|
|
|
Post by draxis on Oct 22, 2012 21:03:30 GMT -5
So that it would be possible to possibly spawn entities, or possibly not spawn any.
|
|
|
Post by Aves Dominari on Oct 22, 2012 21:20:40 GMT -5
Oohh, oohh. I see. Clever girl idea.
|
|
|
Post by draxis on Nov 3, 2012 17:53:29 GMT -5
Fairly bizarre problem:
I=0002293 | | Loading Cataclysm Spawn Data... F=0002301 | | cataclysmScriptSpawnEntity() | data-Assault/maps/cataclysm_spawning.xt contains incorrect item syntax in line 25: "Heavy" My spawning.xt: // Cataclysm Entity/Item Spawning ?EARTH1X1_1 ~MAP // Scripts here are spawned to map-relative coordinates, and are therefore not restricted to a specific area. This is usually used for spawning to anywhere in the map, and should always use [CUBE] since the map is randomly generated and it's impossible to know what will spawn where (so targeting a specific [POS] doesn't make sense). //NONE ~WEIGHT1 // Scripts here will randomly choose an area to spawn each object to, where each target area is chosen based on its "Weight Spawn 1" value. Command Center [ENTITY_ADD]"Snakeman Commander" [FACTION]"Alien" [CUBE](0,0,1)(9,9,1) [FACING]RAND [ITEM]"Heavy Plasma"|"H Plasma Clip"|"R.Hand" [WANDER](0,0,1)(9,9,1) [LEADER]- [ENTITY_ADD]"Snakeman Commander" [FACTION]"Alien" [CUBE](0,0,1)(9,9,1) [FACING]RAND [ITEM]"Heavy Plasma"|"H Plasma Clip"|"R.Hand" [WANDER](0,0,1)(9,9,1) [LEADER]- [ENTITY_ADD]"Snakeman Commander" [FACTION]"Alien" [CUBE](0,0,1)(9,9,1) [FACING]RAND [ITEM]"Heavy Plasma"|"H Plasma Clip"|"R.Hand" [WANDER](0,0,1)(9,9,1) [LEADER]- [ENTITY_ADD]"Snakeman Commander" [FACTION]"Alien" [CUBE](0,0,1)(9,9,1) [FACING]RAND [ITEM]"Blaster Launcher"|"Blaster Bomb"|"R.Hand" [WANDER](0,0,1)(9,9,1) [LEADER]- [SPAWN_ENTITIES]"1" ~WEIGHT2 // Scripts here will randomly choose an area to spawn each object to, where each target area is chosen based on its "Weight Spawn 2" value. Chrysallids [ENTITY_ADD]"Chryssalid" [FACTION]"Alien" [CUBE](0,0,0)(9,9,3) [FACING]RAND [WANDER]MAP [SPAWN_ENTITIES]"5" [REMOVE]0 ~WEIGHT3 // Scripts here will randomly choose an area to spawn each object to, where each target area is chosen based on its "Weight Spawn 3" value. Soldiers [ENTITY_ADD]"Snakeman Soldier" [FACTION]"Alien" [CUBE](0,0,0)(9,9,3) [FACING]RAND [WANDER](9,9,0)(0,0,3) [ITEM]"Plasma Rifle"|"Plasma R Clip"|"R.Hand" [ENTITY_ADD]"Snakeman Soldier" [FACTION]"Alien" [CUBE](0,0,0)(9,9,3) [FACING]RAND [WANDER](9,9,0)(0,0,3) [ITEM]"Plasma Pistol"|"Plasma P Clip"|"R.Hand" [ITEM]"Plasma Grenade"|NONE|"L.Hand" [SPAWN_ENTITIES]"7" [REMOVE]0 ~WEIGHT4 // Scripts here will randomly choose an area to spawn each object to, where each target area is chosen based on its "Weight Spawn 4" value. Specialists [ENTITY]"Snakeman Engineer" [FACTION]"Alien" [CUBE](0,0,0)(9,9,3) [FACING]RAND [ITEM]"Small Launcher"|"Stun Bomb"|"R.Hand" [ENTITY]"Snakeman Navigator" [FACTION]"Alien" [CUBE](0,0,0)(9,9,3) [FACING]RAND [ITEM]"Heavy Plasma"|"H Plasma Clip"|"R.Hand" ~WEIGHT5 // Scripts here will randomly choose an area to spawn each object to, where each target area is chosen based on its "Weight Spawn 5" value. Leaders [ENTITY_ADD]"Snakeman Leader" [FACTION]"Alien" [CUBE](0,0,0)(9,9,3) [FACING]RAND [ITEM]""Heavy Plasma"|"H Plasma Clip"|"R.Hand" [WANDER]MAP [ENTITY_ADD]"Snakeman Leader" [FACTION]"Alien" [CUBE](0,0,0)(9,9,3) [FACING]RAND [ITEM]"Small Launcher"|"Stun Bomb"|"R.Hand" [WANDER]MAP [ENTITY_ADD]"Snakeman Leader" [FACTION]"Alien" [CUBE](0,0,0)(9,9,3) [FACING]RAND [ITEM]"Blaster Launcher"|"Blaster Bomb"|"R.Hand" [WANDER]MAP [SPAWN_ENTITIES]"3" [REMOVE]0 [ENTITY]"Snakeman Leader" [FACTION]"Alien" [CUBE](0,0,0)(9,9,3) [FACING]RAND [ITEM]"Heavy Plasma"|"H Plasma Clip"|"R.Hand" [FOLLOWER]- ~WEIGHT6 // Scripts here will randomly choose an area to spawn each object to, where each target area is chosen based on its "Weight Spawn 6" value. XCOM // NONE // // EXAMPLE: // Random entity spawning (not used in vanilla Cataclysm) // These three lines would spawn six entities anywhere in the area, some being policemen and some criminals (no telling if they'll be evenly matched, or if one will outnumber the other!) // [ENTITY_ADD]"Policeman" [FACTION]"Police" [CUBE](0,0,0)(9,9,0) [FACING]RAND [ARMOR]"Bulletproof Vest" [ITEM]"Beretta 96|P-Clip/9mm|R.Hand" // [ENTITY_ADD]"Criminal" [FACTION]"Criminals" [CUBE](0,0,0)(9,9,0) [FACING]RAND [ITEM]"Baseball Bat|NONE|R.Hand" // [SPAWN_ENTITIES]6 [REMOVE]0 Line 25 : [SPAWN_ENTITIES]"3" [REMOVE]0
When I delete or comment out that line or just the "[REMOVE]0" there is no problem, but if I paste, retype it back in it comes back. I use that same line with a different number of entities multiple times.
-- Now it will sometimes work, but one time it got errors in both 10 and 25 before exiting, the only one for line 10 being E=0006571 | | cataclysmScriptSpawnEntity() | data-Assault/maps/cataclysm_spawning.xt unable to load target for scripted entity in line 10: "Snakeman Commander"
|
|
|
Post by Kyzrati on Nov 3, 2012 20:26:32 GMT -5
The original error was caused by a typo in line 25:""Heavy Plasma" You have two double quotes in a row there.
Don't be fooled by errors "disappearing" or "returning" when you make other changes, since remember that errors in a line that contains a randomly chosen unit/item etc will *only* be caught if that unit/item is actually put into a particular map. So you have to create several maps (just keep hitting F10) to make sure you have no errors at all (if you use random objects, anyway).
And if the parser says there's a syntax error in a specific line, it's definitely that line that's the problem.
|
|
|
Post by draxis on Nov 3, 2012 20:31:54 GMT -5
*facepalms* Somehow I was looking at the wrong line 25, despite the part saying which line I was on.
|
|
|
Post by Kyzrati on Nov 3, 2012 20:42:21 GMT -5
Hehe. You can turn on line numbers in Notepad++ to help. I prefer just looking at the line number in bottom right corner when I need it rather than wasting the screen space on line lumbers, so I don't have that on by default. Another note on looking at your data: Looks like you're using all those Snakeman Commander lines to have a 25% of one with a Blaster Launcher. You could do the same thing by loading the items you want in a list, then specifying [ITEM]
|
|