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
wanne (aka RoWa21) is currently offline wanne (aka RoWa21)

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



That's super sweet. Thumbs up!


Committed

Report message to a moderator

Sergeant Major

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

 
Messages:190
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?

Report message to a moderator

Staff Sergeant
Re: Code Snippets[message #329139] Sat, 21 December 2013 15:19 Go to previous messageGo to next message
Deleted.

 
Messages:2663
Registered:December 2012
Location: Russian Federation
Hello cnagorneac!

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

What version/language are you using?

Report message to a moderator

Lieutenant

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

 
Messages:3509
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.

Report message to a moderator

Captain

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

 
Messages:2663
Registered:December 2012
Location: Russian Federation
I see now :facepalm:

fixed r6699 exe

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

Report message to a moderator

Lieutenant

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

 
Messages:190
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?

Report message to a moderator

Staff Sergeant
Re: Code Snippets[message #329146] Sat, 21 December 2013 16:00 Go to previous messageGo to next message
Flugente

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

Report message to a moderator

Captain

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

 
Messages:2663
Registered:December 2012
Location: Russian Federation
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

Report message to a moderator

Lieutenant

Re: Code Snippets[message #329383] Mon, 30 December 2013 19:53 Go to previous messageGo to next message
wanne (aka RoWa21) is currently offline wanne (aka RoWa21)

 
Messages:1961
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

Report message to a moderator

Sergeant Major

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

 
Messages:2663
Registered:December 2012
Location: Russian Federation
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

Report message to a moderator

Lieutenant

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

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

Report message to a moderator

Captain

Re: Code Snippets[message #329509] Fri, 03 January 2014 19:34 Go to previous messageGo to next message
wanne (aka RoWa21) is currently offline wanne (aka RoWa21)

 
Messages:1961
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

Report message to a moderator

Sergeant Major

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

 
Messages:2663
Registered:December 2012
Location: Russian Federation
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

Report message to a moderator

Lieutenant

Re: Code Snippets[message #329594] Mon, 06 January 2014 17:49 Go to previous messageGo to next message
wanne (aka RoWa21) is currently offline wanne (aka RoWa21)

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

Report message to a moderator

Sergeant Major

Re: Code Snippets[message #329626] Tue, 07 January 2014 19:10 Go to previous messageGo to next message
sionus is currently offline 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

Report message to a moderator

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

 
Messages:2663
Registered:December 2012
Location: Russian Federation
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.

Report message to a moderator

Lieutenant

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

 
Messages:292
Registered:November 2008
How about doing this Silent Storm style: using numpad 8=head, 5=torso, 2=legs, 4=left arm, 6=right arm.

Report message to a moderator

Master Sergeant
Re: Code Snippets[message #329671] Thu, 09 January 2014 22:29 Go to previous messageGo to next message
Flugente

 
Messages:3509
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.

Report message to a moderator

Captain

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

 
Messages:2663
Registered:December 2012
Location: Russian Federation
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

Report message to a moderator

Lieutenant

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

 
Messages:3509
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?

Report message to a moderator

Captain

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

 
Messages:2663
Registered:December 2012
Location: Russian Federation
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

Report message to a moderator

Lieutenant

Re: Code Snippets[message #329684] Fri, 10 January 2014 18:42 Go to previous messageGo to next message
wanne (aka RoWa21) is currently offline wanne (aka RoWa21)

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

Report message to a moderator

Sergeant Major

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

 
Messages:2663
Registered:December 2012
Location: Russian Federation
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

Report message to a moderator

Lieutenant

Re: Code Snippets[message #329932] Wed, 22 January 2014 15:41 Go to previous messageGo to next message
wanne (aka RoWa21) is currently offline wanne (aka RoWa21)

 
Messages:1961
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?

Report message to a moderator

Sergeant Major

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

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

use camo
use camo team
(if in inventory)

Report message to a moderator

Sergeant Major
Re: Code Snippets[message #329935] Wed, 22 January 2014 17:14 Go to previous messageGo to next message
Deleted.

 
Messages:2663
Registered:December 2012
Location: Russian Federation
@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

Report message to a moderator

Lieutenant

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

 
Messages:1448
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

Report message to a moderator

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

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

Report message to a moderator

Captain

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

 
Messages:1448
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"

Report message to a moderator

Sergeant Major
Re: Code Snippets[message #330100] Mon, 27 January 2014 21:28 Go to previous messageGo to next message
Flugente

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

Report message to a moderator

Captain

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

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

"but looting all this corpse' by hand it was so awfull slow, so I ...."

Report message to a moderator

Sergeant Major
Re: Code Snippets[message #330102] Mon, 27 January 2014 21:36 Go to previous messageGo to next message
Flugente

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

Report message to a moderator

Captain

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

 
Messages:1448
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"

Report message to a moderator

Sergeant Major
Re: Code Snippets[message #330104] Mon, 27 January 2014 21:45 Go to previous messageGo to next message
Flugente

 
Messages:3509
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?

Report message to a moderator

Captain

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

 
Messages:1448
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"

Report message to a moderator

Sergeant Major
Re: Code Snippets[message #330106] Mon, 27 January 2014 21:52 Go to previous messageGo to next message
Flugente

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

Report message to a moderator

Captain

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

 
Messages:1448
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

Report message to a moderator

Sergeant Major
Re: Code Snippets[message #330108] Mon, 27 January 2014 22:06 Go to previous messageGo to next message
Off_Topic is currently offline Off_Topic

 
Messages:999
Registered:January 2009
Gorro der Gr

Report message to a moderator

First Sergeant

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

 
Messages:2663
Registered:December 2012
Location: Russian Federation
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

Report message to a moderator

Lieutenant

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

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

Report message to a moderator

Lieutenant
Previous Topic: New Attachment System Beta
Goto Forum:
  


Current Time: Thu Mar 28 10:24:14 GMT+2 2024

Total time taken to generate the page: 0.02724 seconds