Creating A Guide For Combat Encounters

epidemico

Well-Known Member
Apr 5, 2016
146
36
Hey,


In the vein of Gedan's wonderful "How not to make Gedan hate you when you submit a content document," guide for writers, I'm taking it upon myself to help further demystify the process of making an almost absolutely 100% code-ready submission for TiTs. Part of why I'm doing this is to not only help myself better understand the process, but to also make it easier for others to get the sometimes tedious parts of creature building out of the way so they can focus on the actual writing necessary to make these things. 


To do this, however, I'ma need help with understanding the following:


Code Questions
1) this.meleeWeapon = (what does this do, specifically?)
2) this.rangedWeapon.attack = #; (i assume this means they get that number of ranged attacks with their basic attack)
3) this.rangedWeapon.longName = "dart"; (what does this do, specifically?)
4) this.rangedWeapon.attackVerb = "dart"; (--specifically?)
5) this.rangedWeapon.attackNoun = "dart"; (--specifically?)
6) this.rangedWeapon.hasRandomProperties = true; (specifically?)
7) HPMod = (Gedan describes it as "a flat addition to the HP total of a character, as calculated based on level, class and physique,"  but what's the actual equation for it?)
8) HPRaw = HPMax()  (where does the number for the max HP (without the addition of HPMod factored in) a monster enters the battle with come from?)
9) this.skinFlags = new Array(); (what does and the newArray() thing do?)
10) this.elasticity = #; (this needs to be clarified: yeah, it starts at 1, but how elastic does 2 make you, or 10? (Like just a general 2 = a slink, 10 is an amorphous blob of goo would help)
11) this.pregnancyMultiplierRaw = 1 (--specifically? Does a 2 mean you're always gonna get pregnant with 2 kids, or...?)
12) breastRatingRaw = #; (what numbers correspond to what bra-sizes? 0 is obviously flat, so is 1 an A-Cup, 2 a B-Cup, and so on and so forth?)
13) milkMultiplier = # (--specifically?)
14) milkRate = # (--specifically?)
15) milkFullness = # (--specifically?)
16) wetnessRaw = # (--specifically? and what numbers correspond to what kind of wetness?)
17) this.createStatusEffect("") (--specifically?)
18) (Deprecated; see sub heading) resistances = [1, 1, 1, 1, 1, 1, 1, 1] // (this is me just not knowing code, I feel; why the 1s and what happens if we put 0 or 2 or any other number there? And what type of resistance is each number representing?)
19) this.refractoryRate = #; // this.minutesSinceCum = #; this.timesCum = #; (what do these do in terms of combat encounters? Are they arbitrary?)
20) sexualPreferences (this one isn't explained in Gedan's document at all. And what ARE all of the sexual preferences an enemy can have?)
21) this.createPerk (does this give player-specific perks to enemies?)
22) why use " this.tallness = #" as part of the creature profile, but then have "tallness = rand # (equation)" beneath it? 
23) using "rangedWeapon" or "meleeWeapon" without this. before it does what, exactly?
24) using (RandomInCollection(weapon name, weapon name, weapon name))(); i'm assuming that this assigns a random, pre-existing weapon to the appropriate slot at combat start.)
25) this.meleeWeapon.hasRandomProperties;(--specifically?)
26) this.meleeWeapon.baseDamage.type.damageValue = #; (how does this interact when the weapon-as-an-item used by the enemy has a different "baseDamage.type.damageValue = #" associated to it?
(for example: the Nyrea Praetorians have "this.meleeWeapon.baseDamage.kinetic.damageValue = 5," as part of their .as file, but the Nyrea Spear item file has "this.meleeWeapon.baseDamage.type.damageValue = 10".)
27) lipMod = # (--specifically? and what numbers correspond to what size of lips?)
28) tailVenom = # (Gedan says: "Tail venom is a 0-100 slider used for tail attacks. Recharges per hour." but what does that mean, exactly? Does each tail-based attack use Y amount of the Venom stat, or...?)
29) tailRecharge = # (on the flip-side, should this be an arbitrary number for combat encounters, or is the number here how much Venom an enemy recharges per turn?)
30) I don't understand why code for some cocks appears like (A - Nyrea) versus (B - Zil). which do we use?


this.cocks = [];


 


this.cocks.push(new CockClass());


 


(this.cocks[0] as CockClass).cType = GLOBAL.TYPE_NYREA;


 


(this.cocks[0] as CockClass).cLengthRaw = 13;


 


(this.cocks[0] as CockClass).cThicknessRatioRaw = 1.66;


 


(this.cocks[0] as CockClass).addFlag(GLOBAL.FLAG_KNOTTED);


 


(this.cocks[0] as CockClass).virgin = false;




this.cocks = new Array();


 


this.createCock();


 


this.cocks[0].cLengthRaw = 6;


 


this.cocks[0].cThicknessRatioRaw = 1.75;


 


this.cocks[0].cockColor = "black";


 


this.cocks[0].cType = GLOBAL.TYPE_BEE;



Misc Questions
1) When are the GLOBAL.TYPE flags/code used and when aren't they?
2) How are Easy, Moderate, and Difficult Stat checks handled, equation-wise?
3) When can code be left out of an entry? (For example: the Nyrea Praetorians have (this.scaleColor = "green") as part of their entries, but I don't see the color green referenced at all anywhere else?)
4) Can there be more than one kind of customDodge? Like, one for melee and one for ranged attacks? Same question for customBlock. (I haven't gotten a definitive answer for this yet.)
5) What are general stat distributions per level? Or, if that's too large a question: what should the maximum and minimum limit be for any given stat at level 5 and 10? (This includes health and innate shields)
6) Is it possible to create our own Damage Flags, or are the ones that currently existing in-game all we'll have to work with until the Devs decide to make new ones?


00000000000000000000000000000000000000000


My plans for this, after getting all the information and drafting done, would be to create several templates authors could use as the base for designing different kinds of encounters. I know/have heard the general feeling among forumites is that people don't read the documents offered by the Devs to help in the submission process, and this is in no way my attempt at "trying to do better," than they have thus far; but at least for me knowing the answer to the questions above this post would make my writing process much, much simpler.


Later on, I'll ask questions in regards to Item Creation and Parser Tags--specifically stuff not covered by the pre-existing document, or I haven't found covered elsewhere--but I think this is enough for now.


(I'm also hesitating to @ the Devs to this thread right now since I'm so new, but if enough time passes and other forumites can't answer what I'm asking I'll shoot them a line as well.)


Hopefully, I'm not asking too much of stepping on any toes by doing this, hehe.
 
Last edited by a moderator:

Noob Salad

Captain Shitpost
Aug 26, 2015
4,367
1,560
...Right, so first off, not everything you mentioned is actually a parser call. There's a list of them around here somewhere but if you want to make sure you can always check the lookups.


Second, we can't expect all writers to acknowledge everything over on the coding side. Things have been working reasonably well as they have been. For example if I created a character that didn't lactate, then Fen or Gedan would naturally not set any of the milk variables to a non-zero value. Hell, they wouldn't even be relevant (that is, they wouldn't even be in the character file) since the Creature class would initialize them with 0. If there's a discrepancy, like if I created an item but didn't mention any prices, then Fen or Gedan would just decide them for me. Then with any major refactoring any template you'd make would slowly start to get obsolete. That's assuming anyone uses it; like I could just tell you what all 30 of those things do but I'm still not exactly sure what you're trying to make here.


Finally, you (or any writer) need not worry about most of these, especially if you (or they) don't understand it. In particular I'm worried about #22, as apparently you said you don't know what a pointer is. That makes me think you might just add 30 more things tomorrow that you'll also be confused about. Learning is good! We just don't really have time to hold your hand as you step into the wonderful world of classes and instances. "The Devs" definitely don't.


TL;DR: If you want to understand the code you simply need to learn how to code. Or at least mess around in the files.
 
Last edited by a moderator:

epidemico

Well-Known Member
Apr 5, 2016
146
36
@noobsaleh Alright, first off I'm going to take what you said as innocuous advice rather than anything else it might be. Moving on.


My aim is to first create a guide that clearly explains the specifics of code being used/the mechanics behind creating combat encounters in TiTs. This is so that novice coders--like myself--won't have to spend their time learning how to code when all they want to do is write. Coding might be a useful skill, sure; but it's also time added to a process someone might not care to take up on top of writing something for the game. And, sure: Gedan's googledoc is a great primer! I'm not saying it isn't; but I feel it assumes that whomever is reading it has a basic-to-average understanding of how to code. (Parts of it also don't elaborate on, or mention specifics about things I've brought up on this post, which is another reason I wrote this.)


Simply put: it's my belief that throwing a document at Fen--or anyone else--that is riddled with guesswork, or leaves a lot of mechanical fiddling up to them to deal with, is much more of a time-sink--however minuscule it may be--for them than compared to one where an author has filled in all the blanks beforehand. It's just an effort to streamline the process. And, like I said: if a novice writer can just look up a document that's essentially "How to Code in TiTs for Dummies," I think a lot of the stress--major or minor--involved in the process can be reduced, if not entirely avoided.


Now, for the specific points you've brought up:


1) Parsers: "There's a list of them around here somewhere but if you want to make sure you can always check the lookups,"


I've gone through the list you've mentioned, and it's another great guide to use... but none of it actually answers the questions I've got here, so I'm not sure I get where you're coming from telling me to go look at it? 


2) Leaving out Code: "Hell, they wouldn't even be relevant (that is, they wouldn't even be in the character file)"


I, uh. Realize that. And though it'd be great to know what can and can't be left out of a character file, I'm not asking about that. I'm asking what specific things like " milkFullness = # "  do because they're not explained in Gedan's guide or the wiki. (I can parse that milkFullness probably relates to breast size in some way, but I'm not sure if I'm right. That's the point.)


3) Longevity: "Then with any major refactoring any template you'd make would slowly start to get obsolete."


Sorry, but I don't see that as a reason not to try and do this. The same is true for both of the other guides we've mentioned, and I also highly doubt any major refactoring done in the future would make a sample template unrecognizable--I mean, the fact a mod currently lets you play CoC inside of TiTs is kind of testament to that, isn't it?


4) " Like, I could just tell you what all 30 of those things do..."


Please, do. I'm not even being factitious; if you can answer my questions, I'd be extremely thankful.


5) " In particular I'm worried about #22"


I know what a pointer is. My question, and I'll edit this to be more specific now: is why use " this.tallness = #" as part of the creature profile, but then have "tallness = rand # (equation)" beneath it? \/\/hat does it achieve other than randomizing their height? (This is from the Nyrea Praetorian file, btw)


And, finally: 6) " That makes me think you might just add 30 more things tomorrow that you'll also be confused about "


These are literally the only questions I have about this subject. The rest is either covered by Gedan's guide, Smutosaurus, explained in the character files themselves, or are super easy to parse from the code itself. I just want to make sure I have concrete answers for the things I'm lost on--and, as you go on to say: learning is good
 
Last edited by a moderator:

Noob Salad

Captain Shitpost
Aug 26, 2015
4,367
1,560
Yeah hope I didn't come off as rude or anything.


Let me just make sure I understand. So what you're trying to do, is if a writer created a character with A cup breasts, they can just look at your template and be like "Oh, that's breastRatingRaw = 1"; is that right?
 

epidemico

Well-Known Member
Apr 5, 2016
146
36
I have thick skin, don't worry. The tl;dr after you said you could answer all my questions is what kind of threw me off, at first.

Let me just make sure I understand. So what you're trying to do, is if a writer created a character with A cup breasts, they can just look at your template and be like "Oh, that's breastRatingRaw = 1"; is that right?

This is what I'm going for, yeah. I know some of the answers--like the one you just mentioned--are simple guesswork, or just running back to CoC to see what stayed the same; but I wanna be absolutely sure that I'm not getting anything wrong before I start putting things together.
 

Trogdor

Well-Known Member
Apr 10, 2016
309
21
Hey,


In the vein of Gedan's wonderful "How not to make Gedan hate you when you submit a content document," guide for writers, I'm taking it upon myself to help further demystify the process of making an almost absolutely 100% code-ready submission for TiTs. Part of why I'm doing this is to not only help myself better understand the process, but to also make it easier for others to get the sometimes tedious parts of creature building out of the way so they can focus on the actual writing necessary to make these things. 


To do this, however, I'ma need help with understanding the following:


Code Questions
1) this.meleeWeapon = (what does this do, specifically?)
2) this.rangedWeapon.attack = #; (i assume this means they get that number of ranged attacks with their basic attack)
3) this.rangedWeapon.longName = "dart"; (what does this do, specifically?)
4) this.rangedWeapon.attackVerb = "dart"; (--specifically?)
5) this.rangedWeapon.attackNoun = "dart"; (--specifically?)
6) this.rangedWeapon.hasRandomProperties = true; (specifically?)
7) HPMod = (Gedan describes it as "a flat addition to the HP total of a character, as calculated based on level, class and physique,"  but what's the actual equation for it?)
8) HPRaw = HPMax()  (where does the number for the max HP (without the addition of HPMod factored in) a monster enters the battle with come from?)
9) this.skinFlags = new Array(); (what does and the newArray() thing do?)
10) this.elasticity = #; (this needs to be clarified: yeah, it starts at 1, but how elastic does 2 make you, or 10? (Like just a general 2 = a slink, 10 is an amorphous blob of goo would help)
11) this.pregnancyMultiplierRaw = 1 (--specifically? Does a 2 mean you're always gonna get pregnant with 2 kids, or...?)
12) breastRatingRaw = #; (what numbers correspond to what bra-sizes? 0 is obviously flat, so is 1 an A-Cup, 2 a B-Cup, and so on and so forth?)
13) milkMultiplier = # (--specifically?)
14) milkRate = # (--specifically?)
15) milkFullness = # (--specifically?)

Oh lawd. I'm gonna have to break this up so I can read the quote while I'm writing.


1) Defines the melee weapon. I think I kind of already answered this for you in the other thread? But anyway, it's for saying 'hey, I want to give this character a weapon whose stats have already been defined elsewhere' and so all you would do in this case is this.meleeWeapon = new NyreanSpear(); and it'll give that enemy a nyrean spear.


2) Nope. For the purpose of defining weapons, 'attack' is actually 'accuracy' and can be a positive or negative number depending on whether you want an accuracy bonus or penalty. For example, the bolt-action rifle has this.attack = -30;


3) It's literally the weapon's full name. In the cases you've linked, like "this.rangedweapon.longname", It means that you're defining the full name of the weapon you are defining within the document that's otherwise defining a character.


4, 5) defines that verbs and nouns to use when the text parser tries to write out combat lines. If you had some kind of throwing weapon, you'd use something like 'throw' as a verb. For the noun, if the weapon was a Nyrean throwing spear, maybe you'd just put in 'spear'.


6) I have no idea specifically what this does. I could figure it out if you linked me to an example.


7, 8) HPmod is literally just an integer value defined in the character definition that gets tacked on to whatever health it would otherwise get from whatever level it is. Exactly how total HP is calculated, though, I don't know. It's kind of a weird concept becuase the level of enemies never changes. Physique, aim, level, evasion, that stuff is all hardcoded; it doesn't change based on what level the PC is. I don't think health does either, but I could be wrong.


9. It's defining a new array of skin flags. You're defining everything about a character in its definition file, from its combat stats to its height to its description. Depending on what kind of creature it is, you'd add different flags to the array for use by the text parser.


10. If I understand correctly, all Elasticity does is determine how resistant the character's orifices are to being considered 'stretched out'. That is, it can take insertions that are closer to the orifice's capacity without becoming stretched. The 'Elasticity' character creation perk gets you to 1.5. Ruskvel gets you up to 2. Galomax can get you to 3. The Treatment gets you to 3.5. I imagine that if you were able to reach 10, you would be able to take insertions equal to your capacity without stretching.


11. Not sure if this stat even does anything right now. Pregnancy is in kind of a placeholder state where not everything works; for example, the 'incubator' perk you can pick at the start of the game appears to do nothing right now.


12.


 


if (check < 1) return "0-cup";
else if (check < 2) return "A-cup";
else if (check < 3) return "B-cup";
else if (check < 4) return "C-cup";
else if (check < 5) return "D-cup";
else if (check < 6) return "DD-cup";
else if (check < 7) return "big DD-cup";
else if (check < 8) return "E-cup";
else if (check < 9) return "big E-cup";
else if (check < 10) return "EE-cup";
else if (check < 11) return "big EE-cup";
else if (check < 12) return "F-cup";
else if (check < 13) return "big F-cup";
else if (check < 14) return "FF-cup";


And it keeps going up from there, all the way up to zzz-cup, then another whole list of 'hyper' sizes, all the way up to " else if (check >= 199) return "Jacques00-cup"; "
Commented text hints at how big these sizes go:

//watermelon-sized


//tent sized


//truck sized


//parachute sized


//pool-sized


//hanger-sized


//town-sized


//city-sized


//state-sized


//continent-sized


//planet-sized


//WTFISTHISWHYISNTITGAMEOVER?

14. The rate at which you produce milk. The higher this is, the faster you reach your milk capacity.


15. A number that represents your current milk fullness. It's often a long-ass decimal. Similar to ball fullness.

16) wetnessRaw = # (--specifically? and what numbers correspond to what kind of wetness?)


17) this.createStatusEffect("") (--specifically?)
18) (Deprecated; see sub heading) resistances = [1, 1, 1, 1, 1, 1, 1, 1] // (this is me just not knowing code, I feel; why the 1s and what happens if we put 0 or 2 or any other number there? And what type of resistance is each number representing?)
19) this.refractoryRate = #; // this.minutesSinceCum = #; this.timesCum = #; (what do these do in terms of combat encounters? Are they arbitrary?)
20) sexualPreferences (this one isn't explained in Gedan's document at all. And what ARE all of the sexual preferences an enemy can have?)
21) this.createPerk (does this give player-specific perks to enemies?)
22) why use " this.tallness = #" as part of the creature profile, but then have "tallness = rand # (equation)" beneath it? 
23) using "rangedWeapon" or "meleeWeapon" without this. before it does what, exactly?
24) using (RandomInCollection(weapon name, weapon name, weapon name))(); i'm assuming that this assigns a random, pre-existing weapon to the appropriate slot at combat start.)
25) this.meleeWeapon.hasRandomProperties;(--specifically?)
26) this.meleeWeapon.baseDamage.type.damageValue = #; (how does this interact when the weapon-as-an-item used by the enemy has a different "baseDamage.type.damageValue = #" associated to it?
(for example: the Nyrea Praetorians have "this.meleeWeapon.baseDamage.kinetic.damageValue = 5," as part of their .as file, but the Nyrea Spear item file has "this.meleeWeapon.baseDamage.type.damageValue = 10".)
27) lipMod = # (--specifically? and what numbers correspond to what size of lips?)
28) tailVenom = # (Gedan says: "Tail venom is a 0-100 slider used for tail attacks. Recharges per hour." but what does that mean, exactly? Does each tail-based attack use Y amount of the Venom stat, or...?)
29) tailRecharge = # (on the flip-side, should this be an arbitrary number for combat encounters, or is the number here how much Venom an enemy recharges per turn?)
30) I don't understand why code for some cocks appears like (A - Nyrea) versus (B - Zil). which do we use?


this.cocks = [];


 


this.cocks.push(new CockClass());


 


(this.cocks[0] as CockClass).cType = GLOBAL.TYPE_NYREA;


 


(this.cocks[0] as CockClass).cLengthRaw = 13;


 


(this.cocks[0] as CockClass).cThicknessRatioRaw = 1.66;


 


(this.cocks[0] as CockClass).addFlag(GLOBAL.FLAG_KNOTTED);


 


(this.cocks[0] as CockClass).virgin = false;




this.cocks = new Array();


 


this.createCock();


 


this.cocks[0].cLengthRaw = 6;


 


this.cocks[0].cThicknessRatioRaw = 1.75;


 


this.cocks[0].cockColor = "black";


 


this.cocks[0].cType = GLOBAL.TYPE_BEE;

A lot of your size-related questions will be answered if you take a gander at https://github.com/OXOIndustries/Trials-in-Tainted-Space/blob/master/classes/Creature.as


17. It creates a new status effect, a buff or debuff. Within the ( ) you provide the function with additional information that describes what the status effect does and how long it lasts.


18. Like it says, it's deprecated and probably not used. What you find if you look at something like NyreaAlpha.as is


baseHPResistances = new TypeCollection();
baseHPResistances.kinetic.damageValue = 25.0;
baseHPResistances.electric.damageValue = 25.0;
baseHPResistances.burning.damageValue = 25.0;


19. In terms of combat encounters, probably nothing, Unless you're planning on having us fight and then boink the exact same character over and over again. Usually, you're fighting different Nyrea Alphas every time you run into one.


20. It's a collection of what character attributes a character likes for the purpose of determining how much lust damage you do to them. For example if you have small tits and the enemy likes big tits you will do less lust damage with a chest attack. You can look at any character-defining document to see how this is done. https://github.com/OXOIndustries/Trials-in-Tainted-Space/blob/master/classes/Characters/NyreaAlpha.as


21. Not necessarily to enemies (it depends who this. is referring to), and not necessarily player-only perks. Like createstatuseffect, I think it depends on the arguments you pass into the function.


22. Most likely, what that second line actually said was not "=", but "+=" or "-=". You are basically saying, on the first line, "okay, here is either the upper or lower limit for height for this race." Let's say 72 is the shortest you want any of them to be. Then on the next line, you do tallness += rand(5). This will add a random number between 0 and 5 to the existing value of tallness for that instance of that character. This is, again, used in cases where you're meeting many different enemies of a race, not the same one over and over.


23. It wouldn't know whose ranged/melee weapon you were referring to, and would probably throw an error. I don't understand myself exactly how This. works, but basically it tells it that you're referring to a weapon belonging to the character being defined in that document where the This. appears.


24. Yup.


25. idk how this works or why you'd want a weapon to have random properties. There must be some constraints or you'd end up with enemies with guns in damage in the millions 1-shotting you.


26.Hmm.. presumably, you would only use this if you're defining the weapon in the same document as you're defining the character. If you've given them a weapon that's defined in another file as an item and you do this... I presume it would overwrite or add this property to the weapon, but only for the specific copy of that item given to the character(s) defined in the document you do that in.


28, 29. No idea how this works sorry.


30 Well, there's more than one way to write code. They're both doing the same thing: creating an array of cocks for the character defined in the document. Even though there's only one cock in the array by default, events may cause cocks to be added or lost or changed. It can pick which cock to modify by changing the index number, n, in the call. This.cocks[n].(whatever property) = whatever.


That's all the energy I have for answering questions for now. Hope I helped.
 

Nik_van_Rijn

Well-Known Member
Sep 10, 2015
2,407
506
Moscow, RF
28) tailVenom = # (Gedan says: "Tail venom is a 0-100 slider used for tail attacks. Recharges per hour." but what does that mean, exactly? Does each tail-based attack use Y amount of the Venom stat, or...?)
29) tailRecharge = # (on the flip-side, should this be an arbitrary number for combat encounters, or is the number here how much Venom an enemy recharges per turn?)

This looks like a relict from CoC days or early TiTS planing stage. Currently, almost every ability NPCs use use energy consumption, combat routine or cool dowThis looks like a relict from CoC days or early TiTS planing stage. Currently, for almost every ability NPCs use either energy or cooldowns serves as the limiting factor. Unless  PC will never get a combat racial perk which would use somethingn as its limiting factor. Unless devs' policies will drastically change for some reason, PC will never get a combat racial perk which would use something like that either.
 
Last edited by a moderator:

epidemico

Well-Known Member
Apr 5, 2016
146
36

1) "Defines the melee weapon." // Yeah, I figured as much after your help earlier! Thanks for clarifying again; now, my follow-up to this is going to be to figure out if the game can handle a combat encounter where the thing you're up against has fairly different attack patterns depending on whether or not they have a certain weapon equipped or not.


2) "Nope. For the purpose of defining weapons, 'attack' is actually 'accuracy'..." // Then, in the case of the Zil Female I got that bit of code from, " this.rangedWeapon.attack = 1;" means they get a +1 accuracy bonus?


3-5) "It's literally the weapon's full name. In the cases you've linked..." // So, these are what you use to define/create a weapon or basic attack unique to the monster? (And what you'd otherwise use to define how they attack without you having given them an equippable weapon?)


6 & 25) It's from a bit of code belonging to the Zil Female that I've also seen used for other monsters.


 


this.rangedWeapon.longName = "dart";


 


this.rangedWeapon.attackVerb = "dart";


 


this.rangedWeapon.attackNoun = "dart";


 


this.rangedWeapon.hasRandomProperties = true;


9. It's defining a new array of skin flags. // so, should there be an array beneath it? Cuz--if I understand you and what I've read recently about the subject--usually there's a table of code following that, but in most every instance I've seen it used in TiTs it's just there on a single line by itself; for e)(ample:


 


this.faceFlags = new Array();


 


this.tongueType = GLOBAL.TYPE_HUMAN;


 


this.tongueFlags = new Array();


 


this.lipMod = 0;


10-16. These were all in the Creature.as file you linked! Thanks for pointing me to it, holy cow.


17 & 21.  "It creates a new status effect, a buff or debuff." and "CreatePerk" // So this is something you'd def. need to know how to code/how TiTs works to do by yourself, yeah?


20. "Sexual Prefs." // Time to go hunting for all the ones used in the game, then. Unless the Creature.as file has them somewhere I haven't checked yet.


23. "ranged\/\/eapon or melee\/\/ without this. before it // To clarify: I'm specifically referencing the Nyrean Praetorians file here, as they have a line of code that's just:


rangedWeapon = new (RandomInCollection(EagleHandgun, HammerPistol, LaserPistol))(); (but I know this is used specifically to give them a random ranged option upon the fight starting, right?)


26. "I presume it would overwrite or add this property to the weapon" // in which direction? Are the Praetorians using the in their file or the 10 in the Nyrean Spear file?


oooooooooooooooooooooo


Thanks for taking your time to answer as much as you could, seriously. And you linking that Creature.as file is a monumental help!
 

Trogdor

Well-Known Member
Apr 10, 2016
309
21

1) Sure it can. Again, you get to define every attack the character can do, how often it can do it, and under what circumstances. If you've given them a selection of melee and ranged weapons, all you have to do is nest your attacks in if-then-else clauses. If this.meleeweapon == whatever, do this attack. Else if this.meleeweapon == whateverelse, do this other attack.


2) Yup


3) Yup. For an example of how this works look at https://github.com/OXOIndustries/Trials-in-Tainted-Space/blob/master/classes/Characters/Kaska.as


6) Hm. That doesn't really tell me much. You'd have to ask Jacques or Gedan or something.


9) Not necessarily. Just because an array is defined doesn't mean it needs to be populated. It might simply be necessary for every character to have such an array to avoid an error being thrown. You can see in Kaska's definition that she has a tail flag array despite not having a tail.


17) Yeah that's going a bit over my head. target.createStatusEffect("Grappled",0,30,0,0,false,"Constrict","You're pinned in a grapple.",true,0); There's a whole lot of stuff being passed into that function. Some of it is obvious, like the name of the effect and the text it displays when you hover your mouse over the icon, but the rest of it, you'd have to find the function and see what arguments it takes in order to actually use it.


20) Sorry, can't help you there. You'll have to go hunting for wherever lust combat is defined.


23) That's actually probably a bug. You'll notice that where it defines their melee weapon, it does use This.meleeweapon. But it doesn't matter in this case, because if you look at their combatAI function, the praetorians never use ranged attacks:


 


override public function CombatAI(alliedCreatures:Array, hostileCreatures:Array):void
{
var target:Creature = selectTarget(hostileCreatures);
if (target == null) return;

if(!hasStatusEffect("Evasion Boost") && energy() >= 20 && (rand(4) == 0 || HP() < 100)) spearWallGoooo();
else if(energy() >= 5 && rand(6) == 0) nyreanSpearButt(target);
else if(energy() >= 5 && rand(4) == 0) poisonBlade(target);
else if(energy() >= 10 && rand(3) == 0) nyreaGroupBackstabby(target);
else spearFlurryNyreaShit(target);
}


This probably happened because whoever wrote the praetorian .as just copy-pasted the Nyrea Alpha file and edited it until it worked, and the ranged weapon stuff just got left in.


26. I already answered that. :p

I presume it would overwrite or add this property to the weapon, but only for the specific copy of that item given to the character(s) defined in the document you do that in.

That said, doing this would be kind of bad programming. If you're going to edit the properties of a weapon on the fly, give the character their own hardcoded weapon.
 
Last edited by a moderator: