Sounds like this could be used for simple auto-bestowal quests.
Flugente wrote on Tue, 26 July 2016 22:49
This will be widely used in a future feature, but is useful enough on its own that I released it now.
Does that mean that you have specific plans? If so, do you want to reserve a specific block of the array already for general 1.13 use so it doesn't conflict with blocks modders might possibly use?
Hmm. While I planned to release soon, knowing me, it won't be that soon... so you're probably right.
@Modders: The, say, first 100 numbers will soon be used in an upcoming feature which will demonstrate the usage of this more widescaled. It's better for now if you use numbers 100-1000. (I don't plan on using all 100, but better safe than sorry).
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.
Fresh in r8279 & GameDir r2334: Helpful option: if PRINTOUTTILESET is TRUE (default FALSE), pressing [f] over a structure will also print out what tileset the structure's subtileset belongs too, its name, and the specific tile index. This is rather helpful if you set up fortifiction or interactive action xmls, or if you just want to know a sector's tileset.
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.
I removed the parameter "USE_NEW_CTH_CALCULATION" from JA2_Options.ini in GameDir 2335 and cleaned up the code for it in r8281. As nobody complained about the reworked NCTH code in the last three years I assume that it is accepted.
Using an older exe with GameDir 2335 will cause a warning message to appear but you can safely ignore it. The older exes will use the reworked code as default anyway.
Also parameter "BASE_STANDING_STANCE" from CTHConstants.ini is now used in NCTH calculations. I don't know why it was never used in the past.
In r8312, I've somewhat changed the way the game looks for magazines.
Internally, whenever a gun has a mag loaded, we store the id of that ammo item on the gun. When we eject the mag, we get whatever item we had stored. This is also the reason that if we stumble upon an enemy gun with a mag size modifier, unloading it sometimes leads to odd results - like a HK 53 with a mag adapter spawning a 5.56 size 30 mag with a 100 rounds in it.
Anyway, this leads to a problem if we want to load a gun with ammo, but there exists no mag of that calibre and ammotype with the gun's exact magsize (the only reason why this would ever happen is the modder/you fiddling with the xmls). Vanilla code then tries the next best thing - it compromises on ammotype. So if no 5.56 30 AP mag exists, loading a M4 with a 5.56 100 AP belt results in the gun loading a 5.56 30 HP mag. Which is... odd?
I've changed that - we now instead ease on the magsize - we take a magazine of same calibre and ammotype with bigger (but hopefully close to what we originally wanted) magsize. So in this case, a 5.56 42 AP mag (which will only be partially loaded though). With what I mentioned above, loading and unloading the gun at this point will always get you the 42-rnd mag at this point.
Additionally, when looking for a default magazine (which, for example, we do every time a gun spawns, whether in the enemy's inventory or when buying a loaded gun), we originally created no mag if the exact size couldn't be found. Instead, we now do the above change.
While this may not sound like a lot (and will only come in use if your xmls are wonky), this seems somewhat useful for me. Unless I'm missing something (given the many ways to merge/transform/transmogrificate items, quite possible), this would erase the need for every gun to have corresponding magazines. If I am, I'm sure modders will happily correct me ;)
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.
As of r8315, we have yet another hotkey: New command: On [Alt] + [N], all team members in the sector try to put on gas masks. If we have a gasmask but our face is already full with other stuff, we nevertheless remove other face gear and put the mask on.
In case you might wonder Hu? Why does Flugente feel we suddenly need a panic key that causes all team members to instantly put on ABC gear?, let me assure you I did not add this without a specific event in mind.
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.
As you likely don't know, adding animations to the game (especially when they are supposed to be somewhat dynamic) is a huge pita. So for a new development, I don't bother with .sti animations, and draw directly. The (first?) result of this are animated explosion warnings on any armed time bomb (including those in inventories), which I have added in r8319 & GameDir r2345:
Per default, this feature is off (JA2_Options.ini: TIME_BOMB_WARNING = FALSE), because the graphics look horrible, bla bla bla. The important thing is that I can now use this and draw other stuff. If I want, I can now add D2-style aura-effects on soldiers, for example (pala4tw) ;)
The downside is that the graphic functions are... limited. In had to create the function to draw a circle etc., so any advancements will be slow. This was made using the code equivalent of used duct tape.
Anyway, I assume this would work very well along with the delayed grenades sevenfm made. Perhaps he might is interested in adding these to the trunk? (read: seven, please add this to the trunk)
[Updated on: Sun, 16 October 2016 17:14]
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.
This is great, but instead of a sort of activation warning it would be cool something like a circle animation depending on the blast radius in the direction of the throw granade.
New feature: delayed grenade explosions:
- use transformation menu to change explosion mode
- only Normal/Stun/Flashbang type grenades can be delayed
- AI soldiers will avoid staying close to armed grenades\explosives
- use option DELAYED_GRENADE_EXPLOSION to make all hand\GL grenades work as delayed
- new value AP_GRENADE_MODE = 4 in APBPConstants.ini
- new item flag DELAYED_GRENADE_EXPLOSION
Other changes:
- fixed call to sqrt in DrawExplosionWarning() that prevented compiling in VS2010
- correctly update interface after transformations
- PATHAI: AI soldiers will skip gassed tiles if not in gas already
- InGas check: AI soldiers will avoid mustard gas even when wearing gas mask
- Yellow AI: added check to avoid gas/water/bomb using FindNearestUngassedLand
- gas/flare grenades will always explode instantly even when in bad state
- LegalNPCDestination: locations near armed bombs are not legal
- FindBestNearbyCover: avoid locations near armed bombs
Committed in r8324
Patch for gamedir with new options and constants: gamedir patch
@sevenfm: Very good, thank you! I don't have enough time to test right now, but I'll check it out asap.
@ratpaz, funk: The colour currently changes depending on time to detonate. Having the circle be the size of the explosion could be somewhat annoying for very large explosions though. Not sure.
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.
As of r8335 & GameDir r2348, Items in a slot granted by LBE with the flag LBE_EXPLOSIONPROOF (<ItemFlag>2147483648</ItemFlag>) are protected from explosion damage (and cannot cause a chain reaction). In stock, I've added this to the 40mm Grenade Panel (item #1080). Up to now it was pretty useless - other LBE could take more grenades and other item sizes. Now it might be a viable alternative for the grenadier that might come under fire and doesn't want to instantly disintegrate.
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.
As of r8351 & GameDir r2352, there is a new disability, Fear of Heights:
Every second time a merc with this disability climbs a roof, they will complain (and get the morale penalty of MORALE_FEAR_OF_HEIGHTS in Morale_Settings.ini).
Additionally, while they are on a roof, their AP is lowered by 10% and their effective exp level lowered by 2.
I thought about also adding a penalty while being in a mountain sector, but decided against it. As I understand it, fear of heights kicks in when there is something to fear, not by simply being in a place higher than sea level. Otherwise a swiss person with this would spend their entire life in terror, which seems a bit much.
I've added this to Vicki (I mean, her bio is pretty open about it), Sparky and Hector.
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.
Fix: if merc cannot complain about his equipment due to being asleep or on duty, retry an hour later. We basically check this very often, but these checks caused the dialogue (and the morale penalty) to be applied very rarely.
Fix: in AIM bios, show max life, not life at start of game + stat gain. This was only ever noticeable if you create a merc that arrives wounded.
Fix: typo resulted in AIM mercs not refusing job because of hated mercs present when they should do so. A wrong index resulted in a bad access, which hilariously caused a merc to join, even if a hated merc was present, if hated merc 1 was present. Even if that was the same guy
Dialogue clarification: QUOTE_PRE_NOT_SMART is now used for complaints about food, QUOTE_POST_NOT_SMART to refuse smoking. Prior to me adding food and smokes, both weren't used anywhere, so nothing lost here.
By the way... dialogue numbers are stored as UINT16, which means we can have 65K of them. We could add more events for merc dialogue. This would work when we create new ones by ripping sounds from elsewhere, where there might be fitting dialogue. Would not work so good for existing mercs, unless someone keeps track of everywhere these guys worked in the last decades and rips the sounds (for example, Fox' voice actress also appears in the new Deus Ex and so on...). Thoughts on this?
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.
Wouldn't we need a voice file for every merc for an event because you never know which mercs are in a squad? That could be a tedious amount of work and I'm not sure if it is exactly legal to rip sounds from other products and use them here.
Well, the idea would be to write a function that checks whether a file exists for a merc and use that in advance, of course.
Example: I'm creating a merc that has a soundbit that basically says: "Such horrible working conditions in this factory, these poor workers.". This could be played when you first meet Doreen. Of course only this merc would comment - others wouldn't. You wouldn't even realize there is a new soundbit unless you use that one merc.
Legality... that could be an issue, yes. Hmm. When I create new mercs I don't add them to GameDir, not only because of them being non-JA properties, but also because of possible legal issues. As these would be additional soundbites, one could make an unofficial standalone patch that only contains these unofficial soundbits and .edt translations. That would definitely work, even on mods on top of 1.13.
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.
Messages:1533
Registered:January 2015 Location: Home Free
Quote:
Legality... that could be an issue, yes.
There are probably a few appropriate sound clips available to use on the peripheral (i.e. Enemy battleSounds, Crate/Door Opening, Footsteps, etc ) -- such as the Wilhelm Scream, which I use as an Enemy Dying BattleSound.
As of r8359, there is a new disability, Self-Harming:
Whenever a merc with this disability is
in country,
not travelling,
not asleep,
not a doctor or patient,
not in combat,
with at least 90% of their max HP remaining,
there is a 20%-chance that they will harm themselves, dealing 1 damage. This is checked every hour. Snitches can prevent this behaviour. Note that this damage will be bandaged, so this will cause no additional bleeding, and can thus be healed by natural healing. As I'm not entirely sure which existing merc this would fit, I haven't yet added it to any profile.
I also thought about this requiring knives, but then the player would have an incentive to keep knives out from the inventory and keep it on other mercs, and return it prior to combat, which sounds like tedious optimizing that the game already has way too much.
[Updated on: Thu, 12 January 2017 00:46]
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.
As of r8362 & GameDir r2356, there is a new character trait, Coward:
Mercs with this trait
Gain morale when they retreat (MORALE_RAN_AWAY_COWARD in Morale_Settings.ini)
Lose morale when they encounter a numerically superior enemy force (when the enemy forces outnumber mercs + militia by a factor >= 2) (MORALE_ENEMYGROUP_COWARD in Morale_Settings.ini)
While reading through edmortimer's take on the characters, I noticed we could use this one (it is now used for Biff and Lance), but this was only in old character traits, not Sandro's revamp.
We could also recreate the Asshole character trait, but... it does exactly nothing in the old code. I'm not sure what to put there.
What exactly are the tactical/strategical benefits to being an Asshole? Help me out here, community!
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.
Messages:344
Registered:July 2006 Location: France
People generally don't like assholes, so the main effects could be opinion and morale oriented.
A kind of bonus could be the focus of hate on them rather than on the rest of the team (they take more bad opinions but the rest of the team is less impacted by their bad opinions with eachother)
-Kinda sadistic but...- they could have some reverse morale/opinion effects on some actions, ie : if they get shot the team gains morale. If someone heals them the healer gets bad opinion from the team and/or hates even more the asshole.
Things like that i guess.
I guess he thinks very high of himself and would lose more morale on being injured because who the f... could hit the almighty asshole (tm)? On the other hand he would gain morale if others are injured, enemies of course, militia, even members of his own team.
He might not mind or even gain morale for civilian casualties.
He may get a bonus to the "Threaten" approach when talking to an NPC.
He'd probably be angry if other members of his team get better equipment, are treated before him when wounded or killing an enemy that the asshole already hit. "Hey, you took away my kill, dumbass!"
He might get penalties for certain assignments because he considers them beneath him.
Patients might have less heal rating if the doc is an asshole.
Other mercs might learn to dislike or hate the asshole and finally quit if you don't get rid of him.
As of r8362 & GameDir r2356, there is a new character trait, Coward:
Mercs with this trait
Gain morale when they retreat (MORALE_RAN_AWAY_COWARD in Morale_Settings.ini)
Lose morale when they encounter a numerically superior enemy force (when the enemy forces outnumber mercs + militia by a factor >= 2) (MORALE_ENEMYGROUP_COWARD in Morale_Settings.ini)
While reading through edmortimer's take on the characters, I noticed we could use this one (it is now used for Biff and Lance), but this was only in old character traits, not Sandro's revamp.
We could also recreate the Asshole character trait, but... it does exactly nothing in the old code. I'm not sure what to put there.
What exactly are the tactical/strategical benefits to being an Asshole? Help me out here, community!
I'm not sure if that formula is such a good idea. Isn't the player outnumbered 2:1 or worst 95% of the time? Maybe it would be better to limit the reaction / morale loss to the event that is triggered anyway when a soldier spots too many enemies at the same time and freaks out.
Quote:
What makes an asshole in JA2? Just a few ideas:
I guess he thinks very high of himself and would lose more morale on being injured because who the f... could hit the almighty asshole (tm)? On the other hand he would gain morale if others are injured, enemies of course, militia, even members of his own team.
He might not mind or even gain morale for civilian casualties.
He may get a bonus to the "Threaten" approach when talking to an NPC.
He'd probably be angry if other members of his team get better equipment, are treated before him when wounded or killing an enemy that the asshole already hit. "Hey, you took away my kill, dumbass!"
He might get penalties for certain assignments because he considers them beneath him.
Patients might have less heal rating if the doc is an asshole.
Other mercs might learn to dislike or hate the asshole and finally quit if you don't get rid of him.
Not sure asshole is really needed. Isn't that kinda covered by "Malicious" already?
As of r8365, Mercs won't attack teammates or neutrals (profile-based) if their opinion of them is > 20. For good guys, that value is -20.
This fixes a little oddity with good guys: they were perfectly fine with attacking non-buddy, non-good teammates, which doesn't strike me as particulary 'good'.
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.
In r8366, DepressivesBrot improved the item sorting code a bit - guns are now also sorted by weapon type (so first come pistols, then machine pistols, then SMGs and so on). This affects shopkeepers and the strategic inventory.
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.
As of r8367, as I requested myself previously, whenever we trade, the items that the trader won't accept are now marked with a red coloring.
As a result, it's much easier to see what can be traded without having to offer and take back an item. This is not optional, because a) what is the drawback of this anyway? and I'm somewhat sick of people demanding options for every tiny bit of new code and then complaining that there are so many options.
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.
As of r8372, we have a new laptop merc data subpage to display more stats that weren't displayed before, like dialogue approach points and whether merc is a 'good guy':
The points displayed are the internal points a merc has during conversation choices. The final decision whether you get what you want is more complicated (it includes NPC's approach value, their town attachment, their opinion of the merc...), but this is better than nothing.
We can of course, also display other data here, at the moment I'm not sure what.
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.
Awesome, all of it! The change to the display when trading makes me hope for that awesome "sell to merchant from sector inventory"-option you were playing around with
In r8376, I added new records: diseases caught, interrogations, total damage taken, total damage dealt (for safety both UINT32 ).
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.
I slightly altered the chances for bullets to pass things in r8378 & GameDir r2360:
The AmmoTypes.xml- tag <canGoThrough> has been replaced with <usPiercePersonChanceModifier> (unsigned integer). If value is > 0, a bullet can pierce a person after hitting. Higher values increase the chance to do so. This is the same mechanic as before, only now can we modify the thing.
Vehicles can now be pierced as well.
I also somewhat increased the chance for AP an similar ammo to pierce structures.
In case you want to create downright nasty results, set usPiercePersonChanceModifier to 100 and structureImpactReductionMultiplier to 0. Pretty much the only thing stopping these bullets will be Newton
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.
I applied a few fixes on aniamted explosion warnings in r8381. It was possible for the graphics to be drawn over inventory, and the warnings were only drawn if the explosive item was on screen. This has been fixed.
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.
Updated backgrounds (Barry to Reaper, WIP). While backgrounds are always subjective, I feel the current ones are a bit much (after 10 properties, the entire thing becomes a wall of text and doesn't really distinguish the mercs). I'm especially going to cull the stat and approach-boni from all predefined mercs - after all, this base of this data is set in MercProfiles.xml in the first place.
Updated gear kits (Barry to Reaper, WIP). This is sooo tedious, as stock gear kits are just loony. A professional merc goes to war with less ammo than the stereotypical american while buying groceries?
Fix: M16A4 and M4A1 had odd price tags (the entire price structure could probably use a revamp, some stuff is odd in there)
Fix: Ghillie armour (item 807 - 809) cannot be worn. Why do we have 2 separate versions of ghillie, 1197 - 1199 are attachments? Are we somehow incapable of making attachable armour and thus require both?
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.
[*] Fix: Ghillie armour (item 807 - 809) cannot be worn. Why do we have 2 separate versions of ghillie, 1197 - 1199 are attachments? Are we somehow incapable of making attachable armour and thus require both?[/list]
Weren't those relics from the old inventory system like the stealth ops/recon/medic blabla armor parts?
Regarding the Ghillie... it used to be really easy to get 100% camouflage by just using a box of paint. Now it is really hard, especially without Ghillie suits and and camou kits are nearly useless. What I wanted to ask... now that it is so much harder and more expensive to get to 100% - is it now also more powerful to have 100% camouflage or is it the same as 100% was in Vanilla?
Also, regarding laser sights. Those affect camouflage too much. They even reduce your camouflage if you wear the weapon in a sling, that doesn't make sense to me. Doesn't it work the way that those laser sights only get activated when the finger is on the trigger? It should be, maybe we can have a high-end laser sight that does just that. Loosing a ton of camo just for having an MP7 on your back makes little sense to me.
@silversurfer: Hmm. That's very likely. Grr. Sometimes I just want to throw all of that stuff out.
@Vincent J. Claymore: Apart from the odd bug fix or so, afaik camo mechanics are unchanged.
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.