Home » MODDING HQ 1.13 » v1.13 Coding Talk » Experimental Project 7
|
Re: Experimental Project 7[message #347020 is a reply to message #346962]
|
Thu, 22 September 2016 12:57
|
|
Deleted. |
|
Messages:2657
Registered:December 2012 Location: Russian Federation |
|
|
Ja2+AI update:
- fix: correctly calculate enemy threat value when deciding attack (should fix bug with enemy deciding stab attacks too often)
- FindAIUsableObjClass: select weapon with best range and speed for current tactical situation (always try to select weapon that has enough range to closest enemy, then select weapon with best firing speed)
- deafened soldier receives no bonus to morale from walkman
- allow wearing backpack for covert civs/soldiers, use suspicion counter instead
- allow throwing with less CTH if AI soldier has no gun (for example, if AI has only knife and grenade, he has no reason to spare grenade)
- stab attack: take cover into account when deciding which enemy to attack (more correctly decide between shooting and stabbing)
- don't steal weapons from cowering or prone enemy to prevent possible bug
- pick up weapon if soldier has no ammo for his current weapon
- RED AI: pick up ammo for current weapon if soldier has no ammo to reload (for example, if AI soldier picked up a weapon, he will also pick some ammo for it)
- Black watch: only watch if soldier is already looking in the right direction (fix possible bad decision)
- increase chance to shoot at head/legs when shooting at zombie
- SearchForItems: compare deadliness only when current item in hand is a gun (to allow soldier to pick up gun if he already carries launcher or knife)
https://www.dropbox.com/s/9i7e6cxda8gkvtd/ja2_7609en%2BAI_r239.exe?dl=0
https://www.dropbox.com/s/te46533lv7qwf2s/ja2_7609ge%2BAI_r239.exe?dl=0
https://www.dropbox.com/s/ohtzvvki9swv7eu/ja2_7609ru%2BAI_r239.exe?dl=0
This update should fix bug with AI deciding to stab too often, also AI will pick up weapons/ammo better, more effectively fight against zombies and better select gun for attack if it has several guns.
[Updated on: Sat, 01 October 2016 21:34]
Left this community.Report message to a moderator
|
|
|
|
|
Re: Experimental Project 7[message #347122 is a reply to message #347111]
|
Sun, 02 October 2016 16:18
|
|
Flugente |
|
Messages:3507
Registered:April 2009 Location: Germany |
|
|
Very nice! This will make grenades tremendously more useful in area-denial role.
I wonder, did you add an extra turn to non-player grenades? Otherwise, after the player throws a grenade, the AI still has its turn and can evade, while we can't do the same when hit with enemy grenades. Best solution would likely be to detonate player grenades at the start of player turn, enemy grenades at start of enemy turn and so on, but that requires twisting the explosion queue.
On another note - if grenades can be picked up, can they be thrown back? If so, you could make grenades non-disarmable and always pick-up-able...
Edit: On yet another note: I'm currently not up-to-date with the trunk status - are you also committing this to the trunk?
[Updated on: Sun, 02 October 2016 16:33]
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.Report message to a moderator
|
|
|
|
|
Re: Experimental Project 7[message #347126 is a reply to message #347122]
|
Sun, 02 October 2016 20:52
|
|
Deleted. |
|
Messages:2657
Registered:December 2012 Location: Russian Federation |
|
|
Flugente wrote on Sun, 02 October 2016 18:18Very nice! This will make grenades tremendously more useful in area-denial role.
I wonder, did you add an extra turn to non-player grenades? Otherwise, after the player throws a grenade, the AI still has its turn and can evade, while we can't do the same when hit with enemy grenades. Best solution would likely be to detonate player grenades at the start of player turn, enemy grenades at start of enemy turn and so on, but that requires twisting the explosion queue.
Adding a turn for non-player grenade is a good idea. As for changing explosion queue - I don't want to even touch that thing as it may probably result is some unwanted bugs in things like multiplayer etc...
This feature is just an expanded version of old "delay explosion for badly damaged grenades" feature, we simply make grenade a timed mine instead of detonating it in HandleArmedObjectImpact() in physics.cpp:
usFlags |= WORLD_ITEM_ARMED_BOMB;
(*pObj)[0]->data.misc.bDetonatorType = BOMB_TIMED;
if( !fGoodStatus )
{
(*pObj)[0]->data.misc.bDelay = (INT8)( 1 + PreRandom( 2 ) );
}
else
{
(*pObj)[0]->data.misc.bDelay = 1;
}
(*pObj)[0]->data.misc.usBombItem = pObj->usItem;
(*pObj).fFlags |= OBJECT_ARMED_BOMB;
(*pObj).fFlags |= OBJECT_KNOWN_TO_BE_TRAPPED;
// set high trap level
(*pObj)[0]->data.bTrap = 10;
and then add it to world items:
AddItemToPool( pObject->sGridNo, pObj, VISIBLE, bLevel, usFlags, 0 );
// All teams look for this...
NotifySoldiersToLookforItems( );
if ( pObject->ubOwner != NOBODY && !fGoodStatus )
{
MercPtrs[ pObject->ubOwner ]->DoMercBattleSound( (INT8)( BATTLE_SOUND_CURSE1 ) );
}
Also, in UseThrown() in Weapons.cpp we check if SHIFT key is pressed and set new item flag that indicates later that this grenade should be delayed:
if( pSoldier->bTeam == gbPlayerNum &&
_KeyDown(SHIFT) &&
Item[ usItem ].usItemClass & IC_GRENADE &&
Item[ usItem ].ubCursor == TOSSCURS )
{
pSoldier->inv[HANDPOS][0]->data.sObjectFlag |= DELAYED_GRENADE_EXPLOSION;
}
Quote:On another note - if grenades can be picked up, can they be thrown back? If so, you could make grenades non-disarmable and always pick-up-able...
Picking up armed grenade works the same as disarming a trap, so a skilled demolition expert can do this most of the time, but sometimes it will still explode in his hands. After he has picked it up, it works like a regular grenade and can be thrown in usual way or again as delayed grenade.
Quote:Edit: On yet another note: I'm currently not up-to-date with the trunk status - are you also committing this to the trunk?
Not yet, as the feature is still in highly experimental state, but it's very simple and can be easily added to the main trunk.
Also this feature could be probably expanded to allow setting more than 1 turn delay, but it will need some interface work (messagebox or number input field similar to what used for cheating items) and a way to store selected time.
Also this feature could be implemented in slightly different way - arm grenade in the hands like explosive and then throw it, but it didn't work in my test without code changes so I decided to go easy way.
Left this community.Report message to a moderator
|
|
|
|
|
|
Re: Experimental Project 7[message #347155 is a reply to message #347154]
|
Tue, 04 October 2016 19:42
|
|
Deleted. |
|
Messages:2657
Registered:December 2012 Location: Russian Federation |
|
|
edmortimer wrote on Tue, 04 October 2016 21:33Very nice! Will you be releasing a new EXE soon?
I will, but I want to add some new features and more AI improvements, so it will be more experimental release.
What is done currently:
- allow machinegunners to shoot through walls (they can shoot on targets they cannot see even if there's a wall between)
- added fixes for invisible armies (caused by delayed reinforcements) from main trunk (will need more testing)
- soft iron man mode (can save in realtime)
- delayed grenades
- regen boosters damage only half of previous amount of max health
- item transformation: correctly update interface when item is removed (activate grenade in hands, for example)
- fire damages burnable structures (like grass or wooden furniture - more use for molotov's)
[Updated on: Tue, 04 October 2016 19:46]
Left this community.Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
Re: Experimental Project 7[message #347172 is a reply to message #347171]
|
Wed, 05 October 2016 15:12
|
|
mg979 |
|
Messages:16
Registered:May 2007 |
|
|
I tried ja2+AI on 7609 stable, but I can't see the cursor improvements (except the firing mode icon instead of the X). If I press ALT I see an additional gray circle but no other infos. If I add IMPROVED_NCTH_CURSOR = 2 in the INI, I see no difference. The cursor is always round, never oval if crouched/prone. On an unstable SCI installation I can see all improvements. I tried Omerta landing sector and enemies don't shoot much and come out of cover frequently. All standard settings. Is this normal?
[Updated on: Wed, 05 October 2016 15:12] Report message to a moderator
|
Private
|
|
|
Re: Experimental Project 7[message #347173 is a reply to message #347172]
|
Wed, 05 October 2016 15:22
|
|
Deleted. |
|
Messages:2657
Registered:December 2012 Location: Russian Federation |
|
|
mg979 wrote on Wed, 05 October 2016 17:12I tried ja2+AI on 7609 stable, but I can't see the cursor improvements (except the firing mode icon instead of the X). If I press ALT I see an additional gray circle but no other infos. If I add IMPROVED_NCTH_CURSOR = 2 in the INI, I see no difference. The cursor is always round, never oval if crouched/prone. On an unstable SCI installation I can see all improvements. I tried Omerta landing sector and enemies don't shoot much and come out of cover frequently. All standard settings. Is this normal?
All NCTH cursor improvements are working, you don't need options to enable them.
Options from old experimental project don't work in Ja2+AI.
The NCTH cursor is always round in Ja2+AI, it's intentional.
About AI - can't say much without a save. In my games, enemy shoots a lot, but this can depend on the mod, settings, weapon progression etc.
Left this community.Report message to a moderator
|
|
|
|
|
Re: Experimental Project 7[message #347176 is a reply to message #347173]
|
Wed, 05 October 2016 17:09
|
|
mg979 |
|
Messages:16
Registered:May 2007 |
|
|
sevenfm wrote on Wed, 05 October 2016 12:22
All NCTH cursor improvements are working, you don't need options to enable them.
Options from old experimental project don't work in Ja2+AI.
The NCTH cursor is always round in Ja2+AI, it's intentional.
About AI - can't say much without a save. In my games, enemy shoots a lot, but this can depend on the mod, settings, weapon progression etc.
Thanks, then there's no way to see eg the aiming expressed as numbers as with compact cursor? No big deal anyway.
I can't see a full changelog anywhere but I saw this in a new game (NCTH):
- ranger gains -1 aiming levels with rifles, hunter does not
- sniper lost aiming level bonus with ARs
Before the changes you made to sniper, in a couple of games I started (AR/UC113) marksman/sniper and gunslinger outclassed all others, thanks to the much better aiming levels reduction. Still I think auto/heavy weapons experts are a bit weak, and shotguns have too many aiming levels for (rather) short range weapons as they are. So I suggest I like the changes but I would like also:
- machinegunner -1 aiming with AR/SMG, -2 with LMG
- auto weapons -1 aiming with LMG
- heavy weapons -1 aiming with HWs (-2 for bombardier)
- adapt to NCTH the general changes to aiming levels you did for OCTH, or at least reduce aiming levels for shotguns (5 atm like rifles, should be 4 imo)
The few shots from enemies maybe depend from some setting, in UC113 there is a different setting for which enemies start to shoot even if out of range with their weapon, that is they don't wait they are in weapon range, I can't find this setting anymore though. Are there special settings (CTH constants and such) that you recommend with your exe (or in general)? Thanks.
Unrelated to all this, another couple of things I noticed in my games with 7609 (normal exe) that maybe could be improved are:
- it's possible to cheat in the IMP design screen to get the stats you want: create an imp with no traits (or traits that won't set a minimum skill), select the skills you want then FINISH, then cancel, then set the right traits, then in the skill selection screen you have the old selected skills, you can click FINISH again and authorize money transfer to get your cheating IMP
- demolitions trait: gives a huge bonus to cth when throwing grenades (would better fit throwing trait imo), and makes it easier to remove traps, but then the remove traps checks against (and improves) mechanical skill, so you have an explosive expert that isn't good at removing traps even if he has demolitions trait. It's a good trait for the grenade cth bonus alone or with a technician/demolitions hybrid (what I actually did) but the skills themselves are misplaced imo. Either make trap removal check against explosives or rework the trait in some other way.
Report message to a moderator
|
Private
|
|
|
Re: Experimental Project 7[message #347177 is a reply to message #347176]
|
Wed, 05 October 2016 17:34
|
|
Deleted. |
|
Messages:2657
Registered:December 2012 Location: Russian Federation |
|
|
@mg979
Unfortunately there's no full changelog, but all important changes are described in this thread.
There are no changes to NCTH aim levels in Ja2+AI, only OCTH max aiming levels were changed for better balance.
There were some fixes from the main trunk but I cannot remember anything that changes NCTH aim levels.
Quote:adapt to NCTH the general changes to aiming levels you did for OCTH, or at least reduce aiming levels for shotguns (5 atm like rifles, should be 4 imo)
I plan to review NCTH balance including aiming levels some day, but this will probably not happen soon because of other planned features.
Quote:The few shots from enemies maybe depend from some setting, in UC113 there is a different setting for which enemies start to shoot even if out of range with their weapon, that is they don't wait they are in weapon range, I can't find this setting anymore though. Are there special settings (CTH constants and such) that you recommend with your exe (or in general)? Thanks.
I play with the following NCTH settings:
To allow more AI shooting in early game:
MAX_EFFECTIVE_RANGE_MULTIPLIER = 1.5
MAX_EFFECTIVE_RANGE_REDUCTION = 0.1
MAX_EFFECTIVE_USE_GRADIENT = TRUE
This affects only values used for AI calculation, not real CTH.
Also, my settings for better NCTH balance:
BASE_EXP = 1.0
BASE_MARKS = 4.0
BASE_WIS = 1.0
BASE_DEX = 4.0
BASE_STANDING_STANCE = 2.0
BASE_CROUCHING_STANCE = 2.5
BASE_PRONE_STANCE = 3.0
BASE_DIFFICULTY_NOVICE = 0.0
BASE_DIFFICULTY_EXPERIENCED = 0.0
BASE_DIFFICULTY_EXPERT = 0.0
BASE_DIFFICULTY_INSANE = 0.0
AIM_EXP = 1.0
AIM_MARKS = 8.0
AIM_WIS = 2.0
AIM_DEX = 1.0
AIM_DRAW_COST = 0.5
AIM_STANDING_STANCE = 1.5
AIM_CROUCHING_STANCE = 1.0
AIM_PRONE_STANCE = 0.5
AIM_DIFFICULTY_NOVICE = 0.0
AIM_DIFFICULTY_EXPERIENCED = 0.0
AIM_DIFFICULTY_EXPERT = 0.0
AIM_DIFFICULTY_INSANE = 0.0
NORMAL_RECOIL_DISTANCE = 100
Quote:it's possible to cheat in the IMP design screen to get the stats you want: create an imp with no traits (or traits that won't set a minimum skill), select the skills you want then FINISH, then cancel, then set the right traits, then in the skill selection screen you have the old selected skills, you can click FINISH again and authorize money transfer to get your cheating IMP
If player wants to cheat in 1.13, he can always use unlimited possibilities given by ini files :-)
Quote:demolitions trait: gives a huge bonus to cth when throwing grenades (would better fit throwing trait imo), and makes it easier to remove traps, but then the remove traps checks against (and improves) mechanical skill, so you have an explosive expert that isn't good at removing traps even if he has demolitions trait. It's a good trait for the grenade cth bonus alone or with a technician/demolitions hybrid (what I actually did) but the skills themselves are misplaced imo. Either make trap removal check against explosives or rework the trait in some other way.
For disarming, explosives skill is most important:
iSkill = EffectiveExplosive( pSoldier ) * 6;
iSkill += EffectiveMechanical( pSoldier );
iSkill += EffectiveDexterity( pSoldier, FALSE ) * 2;
iSkill += EffectiveExpLevel( pSoldier ) * 10;
And also later influenced by backgrounds and other things and penalized by poor wisdom.
I agree that throwing grenades, picking locks and disarming traps should be separated, but currently we have what we have, I try to keep this project as close to stock 1.13 as possible, though there's definitely something to think about.
There were some changes in trait system in unstable releases also as far as I remember.
Left this community.Report message to a moderator
|
|
|
|
Re: Experimental Project 7[message #347179 is a reply to message #347177]
|
Wed, 05 October 2016 18:13
|
|
mg979 |
|
Messages:16
Registered:May 2007 |
|
|
Ok thanks a lot for all those settings, dexterity/marksmanship rebalance for base/aiming cth makes a lot of sense, I wanted to set it in a similar way.
sevenfm wrote on Wed, 05 October 2016 14:34@mg979
Unfortunately there's no full changelog, but all important changes are described in this thread.
There are no changes to NCTH aim levels in Ja2+AI, only OCTH max aiming levels were changed for better balance.
There were some fixes from the main trunk but I cannot remember anything that changes NCTH aim levels.
But in ja2+AI there is something that alters aim levels for ranger and sniper, you can see it in this saved game.
There are 4 mercs (hunter, ranger, sniper, marksman) with 4 weapons (AR, shotgun, sniper rifle, normal rifle).
With ja2+AI, sniper gets a bonus for sniper rifle and rifle, but not AR (in 7609 he gets -2 bonus)
Ranger gets -1 bonus with rifle(he gets no bonus with in 7609), but not with sniper rifle (as in 7609)
[Updated on: Wed, 05 October 2016 18:13] Report message to a moderator
|
Private
|
|
|
Re: Experimental Project 7[message #347182 is a reply to message #347179]
|
Wed, 05 October 2016 20:12
|
|
Deleted. |
|
Messages:2657
Registered:December 2012 Location: Russian Federation |
|
|
mg979 wrote on Wed, 05 October 2016 20:13But in ja2+AI there is something that alters aim levels for ranger and sniper, you can see it in this saved game.
There are 4 mercs (hunter, ranger, sniper, marksman) with 4 weapons (AR, shotgun, sniper rifle, normal rifle).
With ja2+AI, sniper gets a bonus for sniper rifle and rifle, but not AR (in 7609 he gets -2 bonus)
Ranger gets -1 bonus with rifle(he gets no bonus with in 7609), but not with sniper rifle (as in 7609)
Yes, the aiming levels are different, but I have no idea why this happens - will take a look when I have time.
Left this community.Report message to a moderator
|
|
|
|
|
|
Re: Experimental Project 7[message #347185 is a reply to message #347183]
|
Wed, 05 October 2016 22:05
|
|
Deleted. |
|
Messages:2657
Registered:December 2012 Location: Russian Federation |
|
|
mg979 wrote on Wed, 05 October 2016 23:27Even if unintentional, I think it's a good change. I would prefer weapon traits to be more elastic, something like (expressed in aiming level reductions):
and maybe adjust some base aim levels (bring base for ARs to 5 as for rifles, and increase by 1 for HW, to make them more difficult to handle for non-specialists)
What we have now, from the code:
Pistol, MP: Gunslinger
Shotgun: Ranger
Rifle: max (Ranger/2, Sniper)
Sniper rifle: Sniper
So, aiming levels for assault rifles, smg's and machineguns are not covered by skills.
I don't plan to change it now, but I think there's something to think about.
Left this community.Report message to a moderator
|
|
|
|
Re: Experimental Project 7[message #347186 is a reply to message #347184]
|
Wed, 05 October 2016 22:05
|
|
mg979 |
|
Messages:16
Registered:May 2007 |
|
|
silversurfer wrote on Wed, 05 October 2016 18:40
Actually those were bugs that were fixed in the dev builds and then Sevenfm ported them like other fixes to the experimental exe.
Sniper was never supposed to get the bonus for more than semi auto rifles.
Rangers are most proficient with shotguns and somewhat with rifles. They aren't snipers but they profit more from scopes than non-sniper mercs.
Ok then it was intentional in one way or another. I misunderstood the demolition trait, thinking it was meant also for removing traps, I brought this up because my explosive expert wasn't able to disarm them while my technician was, and thought it was a mistake. But if it's by design, it's ok then. Thanks for the explanation.
[Updated on: Wed, 05 October 2016 22:06] Report message to a moderator
|
Private
|
|
|
|
|
Re: Experimental Project 7[message #347214 is a reply to message #347213]
|
Sat, 08 October 2016 12:09
|
|
Deleted. |
|
Messages:2657
Registered:December 2012 Location: Russian Federation |
|
|
ArulcoLiberator wrote on Sat, 08 October 2016 13:00Hello!
I don´t know if this is a problem i caused with a wrong installation or if this is a bug? With the german AI+fix_r239 exe the game crashes to desktop when crating an I.M.P. character. This happens at the point, where to decide the mnerc is hunter, squadleader, machinegunner etc. By clicking OK the game crashes. With the english exe theres no problem to create an imp character but the error occurs sporadically.
Cant post any links yet but if the game crashes there ist a white Windows dialog named Error with the text "Unhandled exception. Unable to recover."
Greetings
ArulcoLiberator
Hi ArulcoLiberator!
The problem is that I don't even have German Ja2 version, so I cannot reproduce or debug it.
I can only set German define in the sources, compile and hope it works.
Other language versions (English, Russian) work fine with IMP createion as far as I know, so it's something related to your installation or some very specific issue in the code.
Have you tried other Gernam ja2 1.13 exe's - official 7609, Ja2+fix project, older Ja2+AI releases?
Is there any additional information - line of code that caused exception, game logs?
You can post links on the forum by removing http prefix as far as I know.
Left this community.Report message to a moderator
|
|
|
|
Re: Experimental Project 7[message #347215 is a reply to message #347214]
|
Sat, 08 October 2016 12:23
|
|
ArulcoLiberator |
|
Messages:4
Registered:October 2016 |
|
|
I tried to use the germen Ja2+AI exes back to r236. The Error still occurs. So i can't play well with that...
After that I took an English 1.12 Gold version and installed Arulco Vacations 1.07 with patch 2. This comes with latest english Ja2+AI exe r239. I.M.P creation works fine. But then suddenly in battle, the same error occurs.
heres the link: img5.fotos-hochladen.net/uploads/unbenannt0xpgty9ask.jpg
PS:
This is all what the Errorlog says
*** Fri Oct 07 22:52:44 2016 ***
[ VHW02-V1SOK-NICHB-DT472-K3KUJ ]
[7.68001e-006] :
[Updated on: Sat, 08 October 2016 12:27] Report message to a moderator
|
Civilian
|
|
|
|
Re: Experimental Project 7[message #347217 is a reply to message #347216]
|
Sat, 08 October 2016 12:40
|
|
ArulcoLiberator |
|
Messages:4
Registered:October 2016 |
|
|
Okay here is a qicksave i made just before the error occured. Maybe this helps...
filehorst.de/d/buGtwpcp
Sorry its not easy to give hints why the error occurs. The error with the german exe is easy to reproduce. But this happened suddenly in battle. Hard to explain what´s responsible for this...
[Updated on: Sat, 08 October 2016 12:44] Report message to a moderator
|
Civilian
|
|
|
|
|
|
|
|
|
|
Goto Forum:
Current Time: Wed Nov 27 04:45:16 GMT+2 2024
Total time taken to generate the page: 0.03952 seconds
|