Home » MODDING HQ 1.13 » Flugente's Magika Workshop » Absurdly small code changes  () 1 Vote
Re: Absurdly small code changes[message #317000] Wed, 03 April 2013 22:15 Go to previous messageGo to next message
Flugente

 
Messages:3461
Registered:April 2009
Location: Germany
The function does not take into account previous actions (how should that work?), and I will not make it loop over the entire inventory to decide what the player might or might have not have meant when he commanded to switch the item in his hands. It is a short-cut after all. If your view of inventory is different, well, then just do it manually.


Re: Absurdly small code changes[message #317001] Wed, 03 April 2013 22:23 Go to previous messageGo to next message
Istrebitel

 
Messages:222
Registered:December 2009
Location: Russia, Saint-Petersburg
It shouldn't take into account your past actions (that would be cool but not implementable in the current system I believe). It should just start searching from bottom slot of your combat pack upwards, and only then going for the sling slot. Correct search order is the key here.

[Updated on: Wed, 03 April 2013 22:24] by Moderator

Re: Absurdly small code changes[message #317002] Wed, 03 April 2013 22:25 Go to previous messageGo to next message
Flugente

 
Messages:3461
Registered:April 2009
Location: Germany
Yes. And in my view the correct search order begins with the sling. I won't change that aspect.


Re: Absurdly small code changes[message #317004] Wed, 03 April 2013 22:46 Go to previous messageGo to next message
Istrebitel

 
Messages:222
Registered:December 2009
Location: Russia, Saint-Petersburg
Oh come on. How on the world is that a correct order? This is the order that makes the feature useless, can't you see? It makes the feature behave NOT as expected by the user. It can't be considered right? I mean, if "delete" key in your text editor would delete whole text no matter what's selected, you could argue that it's logical "it says delete and it deletes" but it would behave not as expected by your users so you would be better off changing it to actually delete one symbol, or the selected text.

Okay, I will try to explain it again in a different way. Logical proof:

There are hotkey shortcuts for inventory.
Naturally, we can divide players into those who uses them often and those who don't (prefer to manually move items in the inventory). Moreover, those who use one kind of a shortcut would most likely use other kinds of the similar shortcut (like, one using ctrl+click to pick up items from inventory sector is more likely to put items to sector inventory in the same way than one who puts them there manually), and especially ones that use a shortcut for one of its functions are more likely to use it for second function (like, toggle goggles day<>night or toggle squad stealth mode on<>off ones).

So if a person uses SHIFT+ALT+K to remove knife from hand slot, we can assume that more often than not he used that same hotkey to put the knife there in the first place. Therefore, we can assume that he wants to reverse the process. Meaning, from evoking of this command he expects to get the exact gun he had before he used it for the first time to appear in his hand. Not any gun, THAT gun. (Of course if the game puts ANY gun in his hand slot, the function still technically "worked" but it didn't work how the player expected it to do. Therefore, from player perspective, it didn't work, because he still has to open inventory and manually operate it.)

If he used SHIFT+ALT+K hotkey to put the knife in his hand, where did his gun he originally had in his hand go? In case he only has one gun, search order does not matter, therefore from now on we assume he has more than one gun. If he has more than one gun, AND this is a person who is using inveontory shortcuts, we can assume that one of those guns is stored in his sling slot, since he would be using SHIFT+K hotkey as well. Even if not, since inventory space is limited, we still can assume that one of this numerous guns is resting in that slot. Therefore, the gun that was in his hand when he pressed SHIFT+ALT+K could not have went into his sling slot!

Therefore, if we want for the SHIFT+ALT+K hotkey to work as it would be expected to work, we should never start looking from the sling slot, but check the sling slot last.

Again, to stress it out, in case we only have one gun, search order does not matter, so if sling slot was originally empty, we will still get the weapon from that slot back into main hand, no problem.

There. This is a logical proof of why it should work this way and why while it works the way it currently works it is illogical and not working as expected.

[Updated on: Wed, 03 April 2013 22:46] by Moderator

Re: Absurdly small code changes[message #317006] Wed, 03 April 2013 22:58 Go to previous messageGo to next message
Sam Hotte

 
Messages:2011
Registered:March 2009
Location: Middle of Germany
How about the short cut just puts knife into main hand and gun into secondary hand (and using again puts knife back in inventory)?
Re: Absurdly small code changes[message #317008] Wed, 03 April 2013 23:04 Go to previous messageGo to next message
Flugente

 
Messages:3461
Registered:April 2009
Location: Germany
A proof based on your personal preferences isn't really a proof unless your preferences are the common ground. Wether or not that is logical to you (or me) pretty much doesn't matter, unless we form common ground for a definition of what logical in case of 'moving items around our inventory' means.

As I understood you, once we have gun (given multiple guns) in a rifle sling, this should get the lowest priority. Because one is very likely to use it to swap. That doesn't sound right to me. Furthermore, it seems pretty logical to me that the first slot we take something from is the rifle sling - both from a 'real life'-approach as well as gamewise (taking guns from the rifle sling slot costs less AP than from the backpack).



Re: Absurdly small code changes[message #317009] Wed, 03 April 2013 23:05 Go to previous messageGo to next message
Istrebitel

 
Messages:222
Registered:December 2009
Location: Russia, Saint-Petersburg
Good idea. Depends on what you use the knife for, and wether knife CTH depends on having second arm free (like pistols). I'm using knife mostly to carry bodies, so I'd prefer weapon to go into inventory, but if one uses it mostly to cut wire or hit people (and knife CTH does not depend on having second arm free), then indeed putting gun in secondary hand would be okay.
Re: Absurdly small code changes[message #317010] Wed, 03 April 2013 23:09 Go to previous messageGo to next message
Istrebitel

 
Messages:222
Registered:December 2009
Location: Russia, Saint-Petersburg
Flugente, yes from real-life approach your logic is correct and I don't argue with that. My logic is however not based on real-life approach but on "What player expects to happen when he invokes the hotkey" approach.

Sling has to have very low priority because it is very likely to be filled with a gun when we used the hotkey for the first time (to get the knife out). Therefore, if we have more than one gun (otherwise search order does not matter), sling is the least probable place where our gun would go from our hands when we take out the knife. Therefore, in order to do what player expects to happen when he invokes the hotkey for the second time (undo the change that happened when we took the knife out) we have to check sling slot last, as the weapon there was least likely to have been in the hands originally.

I doubt people who are playing with AP costs for inventory manipulation would use shortcuts with uncertain effect (ones that put an item "somewhere") anyway. Especialy when you pay AP to get "uncertain" gun to appear in your hands.

[Updated on: Wed, 03 April 2013 23:11] by Moderator

Re: Absurdly small code changes[message #317012] Wed, 03 April 2013 23:13 Go to previous messageGo to next message
Flugente

 
Messages:3461
Registered:April 2009
Location: Germany
The impasse we are at stems from the fact that we have different views on what a player would expect to happen in that case. As your view (however obvious it may seem to you) seems wrong to me, I won't add it. Simple as that. You (or anyone else) are free to change it, but I don't commit changes that seem wrong to me.


Re: Absurdly small code changes[message #317025] Thu, 04 April 2013 03:28 Go to previous messageGo to next message
Erzengel

 
Messages:15
Registered:February 2013
Location: Germany, "Federal Village...
I was the guy who requested this feature. I'm glad to see that it got implemented, but I would prefer that it puts the rifle in the second hand if the sling is already occupied. This is more realistic, because nobody will put a rifle in his backpack while in combat. I know that it is less precise to shoot with one hand, but I prefer the extra shot given by the smaller AP costs of handling the guns (I play with AP costs for inventory actions) over a little bit more precision.
Re: Absurdly small code changes[message #317027] Thu, 04 April 2013 03:54 Go to previous messageGo to next message
Thor

 
Messages:432
Registered:February 2007
Location: Belgium
In special cases I'd suggest to do it manually, especially if you have AP costs. What a discussion... Think you can be grateful with what you got now, which seems pretty straightforward and logical to me. Thanks Flugente.
Re: Absurdly small code changes[message #317032] Thu, 04 April 2013 11:54 Go to previous messageGo to next message
Erzengel

 
Messages:15
Registered:February 2013
Location: Germany, "Federal Village...
Don't get me wrong. I didn't want to sound ungrateful, I'm really thankful that someone reacts to my feature requests.
When I get the important things of my live done, I will look for time to contribute to the game too.
Re: Absurdly small code changes[message #317066] Fri, 05 April 2013 00:34 Go to previous messageGo to next message
krux

 
Messages:62
Registered:June 2011
A humble feature request, would it be possible to add a parameter that modifies the enemy suppresion tolerance? So that one could make their mercs more resistant while the enemy cower easily or vice versa.

I would like to make the enemy a bit weaker than my mercs in this regard to keep me from abusing quickloading as much.
Re: Absurdly small code changes[message #317311] Thu, 11 April 2013 01:32 Go to previous messageGo to next message
Flugente

 
Messages:3461
Registered:April 2009
Location: Germany
A modifier to suppression effectiveness is on my list, as I suspect the suppression system of being biased (I had instances where a few stray enemy shots rendered a merc with full APs helpless, and have never been able to do that to the enemy). For now, I'll look for possible bugs first.

I've found a rather funny bug there: The calculation of squadleader boni is wrong. You are supposed to get up to 3 squadleader boni (ini value) - but instead, one gets at least 3 boni (if at least one squadleader is found). Together with another possible underflow, this might be a reason why huge packs of enemies are harder to suppress (a normal player wouldn't pack more than 3 SLs, so he wouldn't benefit).

Fixed in r5993.


Re: Absurdly small code changes[message #317325] Thu, 11 April 2013 18:11 Go to previous messageGo to next message
merc05

 
Messages:78
Registered:January 2013
I have found a minor inconveniance. When the "shoot from hip" system was introduced it added a tag that allowed a weapon to only be fired from hip. While the XML Editor uses a tag for this, the game expects a tag called . This makes editor created weapons with this tag appear not to work as they should. So I propose changing the HeavyGun tag in Weapons.cpp into HeavyWeapon. Lines need to be changed are 427, 707, 888. And thanks for the new stuff btw:)
Re: Absurdly small code changes[message #317346] Thu, 11 April 2013 23:25 Go to previous messageGo to next message
Flugente

 
Messages:3461
Registered:April 2009
Location: Germany
@krux: r5996 & GameDir r1647 have two new ini modifiers - SUPPRESSION_EFFECTIVENESS_PLAYER and SUPPRESSION_EFFECTIVENESS_AI - which do what you want Smile


Re: Absurdly small code changes[message #317410] Sun, 14 April 2013 03:57 Go to previous messageGo to next message
krux

 
Messages:62
Registered:June 2011
Awsome! Are these new parameters used instead of the old one or in conjunction with it?

[Updated on: Sun, 14 April 2013 03:58] by Moderator

Re: Absurdly small code changes[message #317415] Sun, 14 April 2013 14:55 Go to previous messageGo to next message
Flugente

 
Messages:3461
Registered:April 2009
Location: Germany
They are used in conjunction.


Re: Absurdly small code changes[message #318292] Tue, 30 April 2013 22:47 Go to previous messageGo to next message
Parkan

 
Messages:451
Registered:April 2010
Location: Russia,Sevastopol

Hello Flugente.I want ask you is it possible to add one function to game?
In ja2_option.ini in Items property setting we have 2 setting:gun damage and gun range modifier.Can you add a gun Ap cost modifier to those settings?is it possible to add?
Re: Absurdly small code changes[message #318345] Wed, 01 May 2013 15:45 Go to previous messageGo to next message
Flugente

 
Messages:3461
Registered:April 2009
Location: Germany
I assume you mean a global modifier to gun firing AP costs. That should be relatively easy, if a minor bit tedious. I'll eventually look into it.


Re: Absurdly small code changes[message #318347] Wed, 01 May 2013 15:48 Go to previous messageGo to next message
Parkan

 
Messages:451
Registered:April 2010
Location: Russia,Sevastopol

yes i mean Ap firing cost.Thank you for answering.
Re: Absurdly small code changes[message #318438] Thu, 02 May 2013 00:07 Go to previous messageGo to next message
Flugente

 
Messages:3461
Registered:April 2009
Location: Germany
I am planning to add 2 new disabilities:
  • Deaf: Hearing gets a huge malus. Could be used for old mercs, or those who witnessed to many close explosions (Kaboom).
  • Shortsighted: Reduced sight range, as one would expect. Would fit Needle, for example.
Any objections?


Re: Absurdly small code changes[message #318443] Thu, 02 May 2013 00:19 Go to previous messageGo to next message
Thor

 
Messages:432
Registered:February 2007
Location: Belgium
No objections, what about a poor night vision? Think it's manageable, right?
Re: Absurdly small code changes[message #318448] Thu, 02 May 2013 00:25 Go to previous messageGo to next message
Parkan

 
Messages:451
Registered:April 2010
Location: Russia,Sevastopol

Flugente,maybe you can add one more disabilities like:Broken\damaged leg that cause a slow moving or moving penalties(like Gus has in his bio,but with that info he has only 65 agility and nothing more)

[Updated on: Thu, 02 May 2013 00:26] by Moderator

Re: Absurdly small code changes[message #318449] Thu, 02 May 2013 00:27 Go to previous messageGo to next message
Sam Hotte

 
Messages:2011
Registered:March 2009
Location: Middle of Germany
Parkan
Flugente,maybe you can add one more disabilities like:Broken\damaged leg that cause a slow moving or moving penalties(like Gus has in his bio,but with that info he has only 65 agility and nothing more)

What should be result of this disability?
Re: Absurdly small code changes[message #318451] Thu, 02 May 2013 00:33 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3804
Registered:July 2009
The logical thing would be to have it cap AGI. So three weeks in the field can't make him a perfect dancer again. Although doing so, you soon enter the 'But then why doesn't X have Y?' cascade.


Re: Absurdly small code changes[message #318456] Thu, 02 May 2013 02:06 Go to previous messageGo to next message
Flugente

 
Messages:3461
Registered:April 2009
Location: Germany
Both new disabilities are in as of r6049, Sam, Kaboom and Needle use them in GameDir r1662.

@Thor: Without any gear, sight range at day is reduced by about 2, and at night by about 1 tile. Seems manageable to me.


Re: Absurdly small code changes[message #318466] Thu, 02 May 2013 07:29 Go to previous messageGo to next message
Thor

 
Messages:432
Registered:February 2007
Location: Belgium
You are talking about the "shortsighted" disability now, I suppose... I like that. But what I meant was another disability... Something like a -3 or (-2) disability at night and in caves without any gear, so a very high one. A specific "nightblindness" disability, without having a disability during the day. It accentuates the contrast with the night-ops guys...
Re: Absurdly small code changes[message #318475] Thu, 02 May 2013 11:17 Go to previous messageGo to next message
Parkan

 
Messages:451
Registered:April 2010
Location: Russia,Sevastopol

Sam_Hotte,slow moving or some other moving penalties for that character.
Re: Absurdly small code changes[message #318483] Thu, 02 May 2013 14:10 Go to previous messageGo to next message
sevenfm

 
Messages:1919
Registered:December 2012
Location: Soviet Russia
CHEM RELIANT, CHEM RESISTANT? (Oh sorry, this is not fallout!)


Re: Absurdly small code changes[message #318524] Thu, 02 May 2013 21:23 Go to previous messageGo to next message
Thor

 
Messages:432
Registered:February 2007
Location: Belgium
Parkan, you probably mean the opposite of the athletics skill, right? I.e. more APs for changing stances and climbing a roof?
Re: Absurdly small code changes[message #318527] Thu, 02 May 2013 21:38 Go to previous messageGo to next message
Parkan

 
Messages:451
Registered:April 2010
Location: Russia,Sevastopol

Yes,something like that.
Re: Absurdly small code changes[message #318559] Fri, 03 May 2013 10:33 Go to previous messageGo to next message
sevenfm

 
Messages:1919
Registered:December 2012
Location: Soviet Russia
And please do not forget about night blindness (nyctalopia).


Re: Absurdly small code changes[message #318574] Fri, 03 May 2013 16:08 Go to previous messageGo to next message
Sam Hotte

 
Messages:2011
Registered:March 2009
Location: Middle of Germany
And do not forget about deuteranopia (Red
Re: Absurdly small code changes[message #318576] Fri, 03 May 2013 16:24 Go to previous messageGo to next message
merc05

 
Messages:78
Registered:January 2013
A sight disability that I think of would be one eye blindness that restricts mercs field of view from one side only, albeit I doubt it is even possible. Maybe a disability for obese mercs (Turtle) to disallow them roof climbing (and maybe fence jumping).
Re: Absurdly small code changes[message #318577] Fri, 03 May 2013 16:27 Go to previous messageGo to next message
lockie

 
Messages:3901
Registered:February 2006
Location: Scotland
Looneys , the lot of you !
Who wants to play with a partially or colour blind sighted merc ?
Absolute nonsense , get a grip guys :crazy:
That's taking realism waaay too far ......


Re: Absurdly small code changes[message #318639] Sat, 04 May 2013 04:19 Go to previous messageGo to next message
188man
Messages:2
Registered:March 2012
Perhaps making the obese mercs diabetic like turtle, so drugs would be integral for at least a few mercs, you'd probably have to put insulin in the game though.
Re: Absurdly small code changes[message #318788] Mon, 06 May 2013 16:04 Go to previous messageGo to next message
vulgarmonkey

 
Messages:51
Registered:May 2011
If I may suggest a feature too.

This may already be the case, I havent really seen the current feature in action yet...

But...
As I understand it, you can now move with weapon ready. However, would it not make sense for that ap cost for movement to be differentially weighted depending on what kind of weapon it is?
ie. moving around with a rifle levelled is not nearly as quick and easy as with a carbine or sidearm.

This may already be the case, the blurb in the ini doesnt seem to specify.

having said that, I have no idea how awkward that would be to implement. I gather certain changes require values to be changed on an individual basis or some such?
Re: Absurdly small code changes[message #319135] Thu, 09 May 2013 12:25 Go to previous messageGo to next message
buuface

 
Messages:165
Registered:October 2011
'OBESE' - Merc cannot climb onto the roof of buildings, and has a chance to trip and fall (marbles effect) after attempting to climb over a wall or fence.

'INSOMNIAC' - Merc recovers energy twice as slowly when supposedly sleeping.

'SNORER'- Merc causes other mercs in sector to recover energy slightly more slowly when supposedly sleeping

haha those last two were just a joke
Re: Absurdly small code changes[message #320759] Sat, 25 May 2013 13:07 Go to previous messageGo to previous message
Parkan

 
Messages:451
Registered:April 2010
Location: Russia,Sevastopol

Is it possible to made Bonus AP points without rising Firing Ap cost from weapons?As for me i don't understand opportunity of bonus Ap,It will allow only a little longer to run during combat,but this lus of bonus AP is nothing.Any possibilities to made such feature on\off in ja2_option.ini?
Previous Topic: Pending Feature: Increased Team sizes
Next Topic: New Feature: Radio Operator
Goto Forum:
  


Current Time: Wed Aug 21 18:52:23 EEST 2019

Total time taken to generate the page: 0.02809 seconds