|
Post by Aves Dominari on Oct 13, 2012 23:12:21 GMT -5
You knew this thread would exist the moment you posted R8 ;p
What I'm trying to do is this. The player has semi-random units, so instead of generating possibly inappropriate items for the random guys I'm giving them special abilities that create the items at the beginning of the game. I'm also making many of the items random to add a bit of flavor to the game; there's no mechanical difference between a sword and an axe, but it's cool that you can have either one.
So, we come to the Data column.
ITEM="Sword"|NUMBER=1|AIR_SPAWN=0|SPAWN_IN_HAND=1
Seems fairly simple, but there are items I don't want going to the hand. If I turn SPAWN_IN_HAND to 0, do I specify a body part or is there a default part to move it to?
Also, I'll need weights for each of the items. How would I separate ITEM from WEIGHT? The usual '|' bar?
|
|
|
Post by Aves Dominari on Oct 13, 2012 23:42:02 GMT -5
Just in case you missed this one in favor of General Questions I'm giving this a bump.
|
|
|
Post by Kyzrati on Oct 13, 2012 23:47:09 GMT -5
You knew this thread would exist the moment you posted R8 ;p Too true. It is, after all, where a lot of the fun and excitement is, and it happens to be the most esoteric of the files. You What I'm trying to do is this. The player has semi-random units, so instead of generating possibly inappropriate items for the random guys I'm giving them special abilities that create the items at the beginning of the game. Hm, that's a pretty interesting way to do it, and it would mostly work, too. You So, we come to the Data column. ITEM="Sword"|NUMBER=1|AIR_SPAWN=0|SPAWN_IN_HAND=1 Seems fairly simple, but there are items I don't want going to the hand. If I turn SPAWN_IN_HAND to 0, do I specify a body part or is there a default part to move it to? If you use 0, it drops it on the ground at that position... (does the same if hands are full, too) I didn't yet add a way for abilities to spawn items anywhere specific besides hands. Spawning to specific inventory locations can only be done through cataclysm_spawning.xt, which is kind of annoying because you can't combine that with a set of random items... In the distant future of modding you'll be able to do anything you want--for now we'll have to consider this a hard limitation you'll have to deal with. You Also, I'll need weights for each of the items. How would I separate ITEM from WEIGHT? The usual '|' bar? Yep, you can combine as many (applicable) data elements as you want using '|'.
|
|
|
Post by Aves Dominari on Oct 13, 2012 23:54:24 GMT -5
Alright. Given the limitations of the system I guess I'll abandon the random guys; it's not like they were necessary anyway ;p
|
|
|
Post by Kyzrati on Oct 14, 2012 0:00:17 GMT -5
Remember you can still do random items as long as you don't mind the items always going to their hands using the [ITEM] [/i] way to figure it out
|
|
|
Post by Aves Dominari on Oct 14, 2012 0:07:45 GMT -5
The way I figure it, I don't mind the loss right now anyway; you've got a fairly large band of guys, and the randomization was more for flavor's sake than anything crunchy (the weapons are still easy to randomize, so I'll just settle with a static band). When I move on to a game with a smaller, more specialized band then I'll probably just drop all their stuff on the ground; it won't be excessive enough to be much of a hassle, I think.
|
|
|
Post by Kyzrati on Oct 14, 2012 0:13:15 GMT -5
For reference you can use [ENTITY_ADD] several times to create your different ents w/different loadouts, then "[SPAWN_ENTITIES]1 [REMOVE]0" to spawn only one of them, or "[SPAWN_ENTITIES]2 [REMOVE]1" to spawn two without a chance of repeating, for example.
|
|
|
Post by Aves Dominari on Oct 17, 2012 23:21:54 GMT -5
Well, I'm on to the last part of my mod now. I want waves of guards to spawn, and so I'm making props to be scattered across the map edges that will turn into guards once the appropriate turn comes. The problem is that I have no idea how to give the newly-spawned guys armor (items are easy enough by simply giving all guards and archers swords and bows by default). Any way to do this? If there isn't any way to do it then I'll just add the armor straight to the entity instead (which I might do anyway, come to think of it...).
|
|
|
Post by Kyzrati on Oct 18, 2012 0:23:21 GMT -5
Instead of props that "turn into" guards, per say, it might make more logical sense to have some props that spawn your guards, rather than turn into them. Like some kind of "Barracks Hatch" prop. You can have the same prop spawn more than one guard if necessary, and handle it in waves using various conditional checks.
As for armor, there is currently no way to give an entity specific armor if you spawn it outside the scenario spawning system. Currently the purpose of armor is twofold: provide protection against damage, and provide extra inventory slots. So unless you really need the extra inventory slots, right now you may as well just stick the damage protection on the entity itself, which does the same thing as armor. That's what I did in Cataclysm rather than messing with actual armor--the only entities with special armor are those which I wanted to have extra inventory slots for holding items.
My plan for the near future is to turn armor into an actual item, so you can remove and wear different armors even while in the game, and you'll also be able to specify what armor an entity gets by default. So expect that feature in a later release.
I've been hesitant to do this for now because it's going to change the data files, and also because I'd have to deal with the color scheme issue: Right now armor changes a unit's color, and that wouldn't be very compatible with armor being exchangeable in game, because then units could start to change colors dynamically, which would be confusing to the player. I may change the appearance of an armored unit to use a slightly different glyph/triangle (I have some hollowish ones prepared for testing at some point), rather than changing its color.
|
|
|
Post by Aves Dominari on Oct 18, 2012 1:01:45 GMT -5
Oohh, I like the sound of fancier glyphs. I ended up just building the resistances into the entities, and it really isn't a big problem (and I'm using one-shot props, as I figured that would give it a more wave-like progression and a pretty clear end point).
|
|
|
Post by jaunmakenro on Oct 18, 2012 9:28:31 GMT -5
OK, this my very first post here !
I try to understand the special_abilities.xt. Maybe not the best way to start to try the modding capabilities...
Do you see a way to create a climbing ability ? I should use something like : TELEPORT_ENT CONTROLLED=1 |RANGE_MAX=1|REQUIRES_LOS=1|NO_VERTICAL=0|AIR_OKAY=1|VIS=ENT_FOV
But how to enable this only if the entity is near a wall ? If i add this special ability to a soldier, is there a trigger that allow the player to use this with a key ? If not, I think I can figure out how to put this ability on an object and then use the object with a soldier, but It would be more fancy to do it without any item...
|
|
|
Post by Kyzrati on Oct 18, 2012 9:52:46 GMT -5
Hey juanmakenro! No, definitely not the best way to start modding... especially since this part of the game is the toughest and also undocumented! (Expect a *lot* more examples with 8.1, though, when I get around to it.) Hm, climbing. I do like the idea of climbing, and will definitely add proper support for it eventually, so it'll be an action instead of an SA hack. Interesting way to try and get it to work through the special ability system--in fact, you seem to only be missing the wall test! I haven't yet added a condition for cell adjacency, so "next to wall" can't be tested for right now. So unfortunately I don't think you can do that one yet. I'd like to say I can add that condition for you, but looking at it now, proper support for conditional checks on a teleport target would be a lot of work. For reference, you can use entity-centric abilities (no item required) through the newly added intrinsic abilities system ('z' key). The proper trigger would be CAST_ON_ENT where data is something like SELECT=1|METHOD=REFLEX (you can also use SELECT=0 if it's the entity's only ability, which will auto-select it). See the Spell_Teleport ability I was playing with. Just give the ability to an entity or its race (you can give Spell_Teleport to an entity to see what it does, too). I like your imaginative uses for the SA system... Makes me want to document the entire thing now to show you everything it can do, but it's a work in progress so much of the effort would go to waste as things change. You can learn more from the examples I'll release in the future. (I really like your idea and it's so close to success, maybe I'll find an easier way to make it possible for you in 8.1, but no promises there )
|
|
|
Post by jaunmakenro on Oct 18, 2012 10:20:31 GMT -5
Great ! Entity-centric abilities was exactly what i was looking for ! Based on your indication, I couldl try to make a teleport/blinking ability in a dishonored style... Ability to stop and bend bend time seems to be much more complicated ^^
I don't know where i'm going with this. Just trying to add some infiltration gameplay... Next step : find a way to make a unit "hidden"...
|
|
|
Post by Kyzrati on Oct 18, 2012 10:48:12 GMT -5
Bend time = MOD_ENT effect and give yourself tons of extra TU (See Syringe_TU effect I used in Cataclysm for an example.) You could limit uses, have using it cost stamina so the entity has to rest afterwards, etc. I, too, was thinking of how to do some kind of stealth effect before ;p You'll have to be *really* creative with that one since I don't think it's even fakeable with the SA system I was planning on doing it at some point, but I didn't actually build visibility of an entity itself into the game at all--visibility is determined by viewer sight range, obstructions (props and smoke), and light level (which right now can only be increased, not decreased--unless of course you destroy the source). The closest thing I can think of off the top of my head is an ability which creates a small area of smoke as an obstruction, like a ninja suddenly surrounded by smoke just before he mysteriously disappears. Another idea for your infiltration game: powerful stun darts.
|
|
|
Post by jaunmakenro on Oct 18, 2012 12:01:21 GMT -5
In fact it could be interesting to add "camouflage" system in the core mechanics. I know this is not so XCOMish but it could nice ! Some armor could have a camouflage percentage as it is in Jagged Alliance game for example... I was also thinking to try to make a smoke screen bomb ind of thing. Extra TU and stun dart are also great ideas ! Huhu, stealth game seems to be trendy : www.rockpapershotgun.com/2012/10/18/the-stealth-letters-part-one/I should try "mark of the ninja"...
|
|