Home » MODDING HQ 1.13 » v1.13 Coding Talk » Code Snippets  () 1 Vote
Re: Code Snippets[message #329068] Wed, 18 December 2013 16:09 Go to previous messageGo to next message
RoWa21

 
Messages:2039
Registered:October 2005
Location: Austria
smeagol
Sevenfm
Improved Auto Fast Forward.



That's super sweet. Thumbs up!


Committed


Re: Code Snippets[message #329137] Sat, 21 December 2013 14:37 Go to previous messageGo to next message
cnagorneac

 
Messages:185
Registered:April 2012
Hi.
Why when I enable one of this options (I put 1 or 2):

SHOW_SUPPRESSION_COUNT = 0
SHOW_SHOCK_COUNT = 0
SHOW_AP_COUNT = 0
SHOW_MORALE_COUNT = 0

i receive "A" letter flying over the enemy with other numbers?
Re: Code Snippets[message #329139] Sat, 21 December 2013 15:19 Go to previous messageGo to next message
sevenfm

 
Messages:1788
Registered:December 2012
Location: Soviet Russia
Hello cnagorneac!

Cannot reproduce.
Tested with latest svn, no 'A' letters.

What version/language are you using?


Re: Code Snippets[message #329140] Sat, 21 December 2013 15:42 Go to previous messageGo to next message
Flugente

 
Messages:3425
Registered:April 2009
Location: Germany
cnagorneac
Hi.
Why when I enable one of this options (I put 1 or 2):

SHOW_SUPPRESSION_COUNT = 0
SHOW_SHOCK_COUNT = 0
SHOW_AP_COUNT = 0
SHOW_MORALE_COUNT = 0

i receive "A" letter flying over the enemy with other numbers?
Fixed in r6699. The problem was that with the new display options recently introduced, the game wanted to display a damage of 0 - in which case the error string wasn't initialized. As a result, the game printed out garbage.


Re: Code Snippets[message #329143] Sat, 21 December 2013 15:55 Go to previous messageGo to next message
sevenfm

 
Messages:1788
Registered:December 2012
Location: Soviet Russia
I see now :facepalm:

fixed r6699 exe

[Updated on: Sat, 21 December 2013 16:00] by Moderator



Re: Code Snippets[message #329145] Sat, 21 December 2013 15:57 Go to previous messageGo to next message
cnagorneac

 
Messages:185
Registered:April 2012
Thanks.
Is there any other place then https://skydrive.live.com/?cid=013a6926eac52083&id=13A6926EAC52083%21202#cid=013A6926EAC52083&id=13A6926EAC52083%21202
where I can download an .exe file?
Re: Code Snippets[message #329146] Sat, 21 December 2013 16:00 Go to previous messageGo to next message
Flugente

 
Messages:3425
Registered:April 2009
Location: Germany
Just give DepressivesBrot some time Wink


Re: Code Snippets[message #329354] Sun, 29 December 2013 07:57 Go to previous messageGo to next message
sevenfm

 
Messages:1788
Registered:December 2012
Location: Soviet Russia
Experimental visual feature.
New option SHOW_ENEMY_ADDITIONAL_INFO in ja2_options.ini
0 - nothing
1 - show awareness sign above enemy soldier (useful for sneaking and covert operations)
Eye sign means that enemy sees you.
Color shows enemy alert level (green, yellow, orange, red)
2 - show if enemy wears gas mask or nvg
3 - show if enemy has any armour (helmet, vest, leggings)
Note: additional info is shown only at limited range (based on current vision distance and merc's experience), similar to dynamic tooltips.

some screenshots:
same screenshots on imgur.com:
r6720 patch
gamedir1904_patch
r6720 exe for testing

[Updated on: Sun, 29 December 2013 11:45] by Moderator



Re: Code Snippets[message #329383] Mon, 30 December 2013 19:53 Go to previous messageGo to next message
RoWa21

 
Messages:2039
Registered:October 2005
Location: Austria
Sevenfm
Experimental visual feature.
New option SHOW_ENEMY_ADDITIONAL_INFO in ja2_options.ini
0 - nothing
1 - show awareness sign above enemy soldier (useful for sneaking and covert operations)
Eye sign means that enemy sees you.
Color shows enemy alert level (green, yellow, orange, red)
2 - show if enemy wears gas mask or nvg
3 - show if enemy has any armour (helmet, vest, leggings)
Note: additional info is shown only at limited range (based on current vision distance and merc's experience), similar to dynamic tooltips.

some screenshots:
same screenshots on imgur.com:
r6720 patch
gamedir1904_patch
r6720 exe for testing


committed


Re: Code Snippets[message #329491] Fri, 03 January 2014 12:28 Go to previous messageGo to next message
sevenfm

 
Messages:1788
Registered:December 2012
Location: Soviet Russia
Another experimental visual enhancement:
Improved health bar.

Option SHOW_HEALTHBARSOVERHEAD is now integer:
0 - no bar
1 - default health bar
2 - small version of new bar
3 - large version of new bar
4 - small health bar + AP indicator
5 - large health bar + AP indicator

New health bar offers you:
- Suppression shock indicator (shock affects your CTH)
- Optional larger version (useful for hires playing)
- Cover indicator that will tell you if your cover is not perfect
- Target movement tile cover indicator (hold SHIFT)
- Sneaking indicator (sneaking is shown by brown border color)
- AP indicator (red if AP<10, dark grey if AP
Note: cover indicators are enabled only in turnbased combat or when sneaking

Small version screenshots
Large version screenshots
Health bar + AP counter + cover indicatorDemonstration

r6726 patch
gamedir1911 patch
exe r6726 for testing

[Updated on: Fri, 03 January 2014 16:26] by Moderator



Re: Code Snippets[message #329498] Fri, 03 January 2014 16:59 Go to previous messageGo to next message
lockie

 
Messages:3929
Registered:February 2006
Location: Scotland
Looks ok :thumbsup:


Re: Code Snippets[message #329509] Fri, 03 January 2014 19:34 Go to previous messageGo to next message
RoWa21

 
Messages:2039
Registered:October 2005
Location: Austria
Sevenfm
Another experimental visual enhancement:
Improved health bar.

Option SHOW_HEALTHBARSOVERHEAD is now integer:
0 - no bar
1 - default health bar
2 - small version of new bar
3 - large version of new bar
4 - small health bar + AP indicator
5 - large health bar + AP indicator

New health bar offers you:
- Suppression shock indicator (shock affects your CTH)
- Optional larger version (useful for hires playing)
- Cover indicator that will tell you if your cover is not perfect
- Target movement tile cover indicator (hold SHIFT)
- Sneaking indicator (sneaking is shown by brown border color)
- AP indicator (red if AP<10, dark grey if AP
Note: cover indicators are enabled only in turnbased combat or when sneaking

Small version screenshots
Large version screenshots
Health bar + AP counter + cover indicatorDemonstration

r6726 patch
gamedir1911 patch
exe r6726 for testing


committed


Re: Code Snippets[message #329552] Sat, 04 January 2014 16:58 Go to previous messageGo to next message
sevenfm

 
Messages:1788
Registered:December 2012
Location: Soviet Russia
As pressing Shift+4 to call new traits menu is not always convenient, i decided to additionally bind this menu to ALT+RMB (this corresponds to usual windows interface style - context menu).
I also moved menu to cursor position instead of soldier's position, as you anyway will use mouse to operate this menu.

Here's the demonstration:
https://www.youtube.com/watch?v=RS7AKv0rWq0[/video]
youtube link

r6730 patch
patched r6730 exe for testing

[Updated on: Sun, 05 January 2014 18:43] by Moderator



Re: Code Snippets[message #329594] Mon, 06 January 2014 17:49 Go to previous messageGo to next message
RoWa21

 
Messages:2039
Registered:October 2005
Location: Austria
@Sevenfm: Thanks + committed


Re: Code Snippets[message #329626] Tue, 07 January 2014 19:10 Go to previous messageGo to next message
sionus
Messages:3
Registered:January 2010
Now, if aim and shoot without target (enemy, door, etc...), mercs shoot in the ground (z=1).
This path add following feature:
when shooting,
if alt pressed, soldier shoot to z+64, (legs)
if shift pressed, soldier shoot to z+128 (torso)
if alt and shift pressed, soldier shoot z+64+128, (head)

It also affects enemy/militia soldiers, not sure is it good...
patch
ja2.exe

Re: Code Snippets[message #329628] Tue, 07 January 2014 20:09 Go to previous messageGo to next message
sevenfm

 
Messages:1788
Registered:December 2012
Location: Soviet Russia
Quote:
Now, if aim and shoot without target (enemy, door, etc...), mercs shoot in the ground (z=1).
This path add following feature:
when shooting,
if alt pressed, soldier shoot to z+64, (legs)
if shift pressed, soldier shoot to z+128 (torso)
if alt and shift pressed, soldier shoot z+64+128, (head)

Hello Sionus! My points:
1) Being able to control shot's height is good. May be useful in some situations.
2) Using 2 modifier keys for 1 feature is probably not good.
3) How i see it: use SHIFT+mousewheel when aiming (no matter if there is target or not) to add height correction to shot. Current correction value is displayed somewhere as numbers or more advanced indicator with moving mark or smth. For grenade launcher's shots, this feature could adjust throwing angle. For OICW, it could in the future set distance for programmed airbursts. Being able to control throwing angle may be also useful when throwing hand grenades through windows.


Re: Code Snippets[message #329670] Thu, 09 January 2014 22:05 Go to previous messageGo to next message
Taro_M

 
Messages:297
Registered:November 2008
How about doing this Silent Storm style: using numpad 8=head, 5=torso, 2=legs, 4=left arm, 6=right arm.
Re: Code Snippets[message #329671] Thu, 09 January 2014 22:29 Go to previous messageGo to next message
Flugente

 
Messages:3425
Registered:April 2009
Location: Germany
We cannot target arms, apart from that, good. ALT / SHIFT are used for dozens of key combos, we should not use them for this.


Re: Code Snippets[message #329674] Fri, 10 January 2014 03:43 Go to previous messageGo to next message
sevenfm

 
Messages:1788
Registered:December 2012
Location: Soviet Russia
1) Improved cover indicator:
SHOW_COVER_INDICATOR
0 - nothing
1 - show as small square to the right of health bar
2 - show using color of merc's name
3 - same as 1, show only in stealth or when disguised
4 - same as 2, show only in stealth or when disguised
Screenshots:
2) Enemy rank (exp. level) icons:
SHOW_ENEMY_RANK_ICON
0 - do not show
1 - show icon
2 - show icon from .sti (not yet implemented)
Screenshots:
3) Enemy health bar:
SHOW_ENEMY_HEALTH
0 - do not show
1 - show health as text (default)
2 - show health bar
3 - show health + ap
4 - show health + ap + shock
5 - show health + ap + shock + morale
6 - show health + ap + shock + morale + bp
Notes:
This option replaces HIDE_ENEMY_HEALTH_TEXT
Shown values are relative percents, so if enemy's full health is 60 and he has 60 then 100% full bar will be shown and not 60% of full bar.
Same with AP (negative AP is shown by grey bar) and others.
Also enemy status bars are much simpler then player's health/energy bar - enemy health bar does not show poison/wounds and such, only relative health level. It was intended to simplify visuals and not supply player with excessive information. (may be changed though)
Screenshot:
4) Minor improvements:
Enemy awareness sign now shows up only in stealth/disguised mode.
Turned on Extended Disarm Dialog for turnbased (it was implemented but turned off)

Video demonstration:
https://www.youtube.com/watch?v=OKsF9ipPg8s&feature=youtu.be[/video]
youtube link
patched r6744 exe

Recommended settings for regular gameplay (from video example above):
INDIVIDUAL_ENEMY_NAMES = FALSE
INDIVIDUAL_ENEMY_RANK = FALSE
SHOW_ENEMY_RANK_ICON = 1
SHOW_ENEMY_HEALTH = 4
SHOW_COVER_INDICATOR = 2
SHOW_ENEMY_ADDITIONAL_INFO = 1
SHOW_ENEMY_WEAPON = TRUE
SHOW_HEALTHBARSOVERHEAD = 4

r6744 patch
gamedir1914 patch

[Updated on: Fri, 10 January 2014 14:57] by Moderator



Re: Code Snippets[message #329676] Fri, 10 January 2014 03:52 Go to previous messageGo to next message
Flugente

 
Messages:3425
Registered:April 2009
Location: Germany
Aww, shiny! I really like what you're doing to the interface here (though with all these infos, it takes while to figure out which colour and which number means what Smile ).

Question though, why is the enemy health bar pink? And why does the gold bar only appear after a merc was shot (in your video)? I assume you use the bars for multiple things at once?


Re: Code Snippets[message #329677] Fri, 10 January 2014 04:01 Go to previous messageGo to next message
sevenfm

 
Messages:1788
Registered:December 2012
Location: Soviet Russia
Thanks!
The idea was to minimize shown info and text on screen but still trying to keep all the really needed info for player.
Colors and such are subject to discussion:
Health bar color is RED ( 200, 0, 0 )
AP bar color is PURPLE(?) ( 110, 30, 210 ) to distinguish it from BP (and negative APs are shown as ( 140, 140, 140 ))
Suppression shock bar is ORANGE ( 200, 120, 0 )
Morale is GREEN ( 0, 140, 0 )
and BP is BLUE ( 0, 0, 200 )

Yellow (ORANGE) bar shows suppression shock, which has influence on player's CTH and interrupt level.

So in the video example enemy "health bar" consists of three independent bars - health, AP and shock.
Maybe those legacy namings are misleading sometimes.

Colors in video are not exact, it's better to look at screenshots for them.

[Updated on: Fri, 10 January 2014 04:11] by Moderator



Re: Code Snippets[message #329684] Fri, 10 January 2014 18:42 Go to previous messageGo to next message
RoWa21

 
Messages:2039
Registered:October 2005
Location: Austria
@sevenfm: thanks, committed.


Re: Code Snippets[message #329918] Wed, 22 January 2014 06:06 Go to previous messageGo to next message
sevenfm

 
Messages:1788
Registered:December 2012
Location: Soviet Russia
Sector actions menu (Ctrl+[.]) reworked:

http://i.imgur.com/sbxm5Qz.png

Also added support for 16 medium size buttons dialog.
16-button dialog supports custom color for each button text (will be used in planned feature).

r6807 patch


Re: Code Snippets[message #329932] Wed, 22 January 2014 15:41 Go to previous messageGo to next message
RoWa21

 
Messages:2039
Registered:October 2005
Location: Austria
@savenfm: Very cool, I am going to add it to svn.
what about those 2 "unused" buttons? Can they be removed, so you only have a total of 6 buttons?


Re: Code Snippets[message #329933] Wed, 22 January 2014 16:12 Go to previous messageGo to next message
Gorro der Grüne

 
Messages:1542
Registered:March 2009
Location: Broadwurschd-City
how about

use camo
use camo team
(if in inventory)
Re: Code Snippets[message #329935] Wed, 22 January 2014 17:14 Go to previous messageGo to next message
sevenfm

 
Messages:1788
Registered:December 2012
Location: Soviet Russia
@RoWa21:

One of the "unused" buttons is used to "test disguise", when your merc is wearing civilian or military clothes.The last one is probably reserved for future features.

This way of using and naming buttons was intended by Flugente, i only moved cleaning buttons to one line in this version, so it looks better and more logical.

I didn't change anything about functionality, only visual part (made it vertical 4x2), as the original horizontal 2x4 version was ugly.

@Gorro der Gr


Re: Code Snippets[message #330091] Mon, 27 January 2014 20:18 Go to previous messageGo to next message
Gorro der Grüne

 
Messages:1542
Registered:March 2009
Location: Broadwurschd-City
Sevenfm

The last one is probably reserved for future features.


??? skin (take cloath) of all that carnage and gut those bloody Kiddies and dead cattle ???

would be nice
Re: Code Snippets[message #330095] Mon, 27 January 2014 21:14 Go to previous messageGo to next message
Flugente

 
Messages:3425
Registered:April 2009
Location: Germany
Already in, gorro. When using a knife on corpses, you might receive a few things... Go kill some wildlife.


Re: Code Snippets[message #330099] Mon, 27 January 2014 21:25 Go to previous messageGo to next message
Gorro der Grüne

 
Messages:1542
Registered:March 2009
Location: Broadwurschd-City
[color:#FF0000]NOT[/color] in

I wrote ALL = automatically not per hand

:uhh: :wb: :wb: :wb: :wb:







Gwynneth: "Gorro knows how tu use his tool knife and what he gets as a reward"
Re: Code Snippets[message #330100] Mon, 27 January 2014 21:28 Go to previous messageGo to next message
Flugente

 
Messages:3425
Registered:April 2009
Location: Germany
What is this, kindergarten? Corpses are meant to be defiled by hand!


Re: Code Snippets[message #330101] Mon, 27 January 2014 21:31 Go to previous messageGo to next message
Gorro der Grüne

 
Messages:1542
Registered:March 2009
Location: Broadwurschd-City
*singing*

"but looting all this corpse' by hand it was so awfull slow, so I ...."
Re: Code Snippets[message #330102] Mon, 27 January 2014 21:36 Go to previous messageGo to next message
Flugente

 
Messages:3425
Registered:April 2009
Location: Germany
What's there to loot? Don't tell me you are trying to make a profit from their uniforms.


Re: Code Snippets[message #330103] Mon, 27 January 2014 21:38 Go to previous messageGo to next message
Gorro der Grüne

 
Messages:1542
Registered:March 2009
Location: Broadwurschd-City
oc I do.

I also take Skyrider's 10 bucks.

This is a ecconomic simulation in lead.



Edith: "btw why aren't their cloath been damaged? at least some of them get bursted through the breast"

Yellowsubmarine: "some are stacked and can't be looted properly"
Re: Code Snippets[message #330104] Mon, 27 January 2014 21:45 Go to previous messageGo to next message
Flugente

 
Messages:3425
Registered:April 2009
Location: Germany
:uhh: You aren't meant to make a business out of that. If you are willing to perform a boring, meaningless task just to get a minimal amount of virtual money, I think you deserve the boredom. I won't take that from you.

Clothes do get damaged. If a soldier is shot in the chest, you won't receive a shirt from him. It would be unusable to a spy anyway. Also, corpses can be picked up and dropped elsewhere, thereby removing the stack issue.

Also, do you watch your washing machine washing? Or is that too intense?


Re: Code Snippets[message #330105] Mon, 27 January 2014 21:49 Go to previous messageGo to next message
Gorro der Grüne

 
Messages:1542
Registered:March 2009
Location: Broadwurschd-City
I also use tham fo my Molotov productiion

Why cant I rip them in stacks (as the T-Shirts)








Fridoline: "You know there are diffrent ways to do a job?"

Carla: "Gorro makes so much money in Arulco that he allways buys knew cloaths"
Re: Code Snippets[message #330106] Mon, 27 January 2014 21:52 Go to previous messageGo to next message
Flugente

 
Messages:3425
Registered:April 2009
Location: Germany
You are old enough to add the required xml entries.


Re: Code Snippets[message #330107] Mon, 27 January 2014 22:03 Go to previous messageGo to next message
Gorro der Grüne

 
Messages:1542
Registered:March 2009
Location: Broadwurschd-City
how?

and I don't want to do it again with every new release



btw it was me who found this out
Re: Code Snippets[message #330108] Mon, 27 January 2014 22:06 Go to previous messageGo to next message
Off_Topic

 
Messages:1038
Registered:January 2009
Gorro der Gr


Re: Code Snippets[message #330288] Mon, 03 February 2014 08:34 Go to previous messageGo to next message
sevenfm

 
Messages:1788
Registered:December 2012
Location: Soviet Russia
Minor improvement/fix for "Improved Bomb Planting" feature.
1. Now you don't need to hold shift all the time while planting bomb, just shift+click is enough.
2. If successfully taken new bomb from inventory (or using Tripwire Roll), cursor is not changed back to MOVE after planting bomb.
This means one less right-click for each bomb when making big minefields/tripwire networks.

r6870 patch


Re: Code Snippets[message #330292] Mon, 03 February 2014 18:37 Go to previous messageGo to previous message
silversurfer

 
Messages:2472
Registered:May 2009
Thank you. Committed in revision 6876.

Previous Topic: New Attachment System Beta
Goto Forum:
  


Current Time: Mon Dec 17 10:20:08 EET 2018

Total time taken to generate the page: 0.03426 seconds