Home » MODDING HQ 1.13 » Flugente's Magika Workshop » Absurdly small code changes  () 1 Vote
Re: Absurdly small code changes[message #324168] Mon, 19 August 2013 22:43 Go to previous messageGo to next message
Gambigobilla

 
Messages:714
Registered:July 2008
IIRC you could not advance time in underground sectors, probably wrong and i'm mixing it up with sth else.
Re: Absurdly small code changes[message #324170] Tue, 20 August 2013 00:18 Go to previous messageGo to next message
Shadow21

 
Messages:334
Registered:November 2001
Location: on route to San Hermanos
Gambigobilla
IIRC you could not advance time in underground sectors, probably wrong and i'm mixing it up with sth else.

was thinking the same thing but wasnt sure. so it seems to be right Very Happy
Re: Absurdly small code changes[message #324171] Tue, 20 August 2013 00:41 Go to previous messageGo to next message
Flugente

 
Messages:3461
Registered:April 2009
Location: Germany
Nope. Avancing time underground works, and repairing does work (if I remove the condition). Would be odd if you couldn't speed up time if one of your 32 mercs is underground, wouldn't it?


Re: Absurdly small code changes[message #324261] Fri, 23 August 2013 13:15 Go to previous messageGo to next message
acqsen

 
Messages:17
Registered:December 2011
I'd like to ask for three small features, probably too small to make a separate topic

Feature1
Show (enemy) soldiers energy and morale in the tooltip, if it is set to show all information
SOLDIER_TOOLTIP_DETAIL_LEVEL = 4
why i need this

Feature2
Capturing and Sending Police to prison (and other hostile civilians)
more explanation on this in capturing topic here

Feautre3
Slow/reduce Merc dying by introducing negative hp's
How it would work:
-merc hp_max=60, shot for 65, drops down with -5hp.
-looses x each turn (the old way)
-each turn x% of insta death
-drops to -10hp = 50%death
-drops to -20hp = 100%death (15 is max_hp/3)
why i ask this



Re: Absurdly small code changes[message #324282] Sat, 24 August 2013 00:23 Go to previous messageGo to next message
Flugente

 
Messages:3461
Registered:April 2009
Location: Germany
Acqsen
I'd like to ask for three small features, probably too small to make a separate topic

Feature1
Show (enemy) soldiers energy and morale in the tooltip, if it is set to show all information
SOLDIER_TOOLTIP_DETAIL_LEVEL = 4
why i need this

That seems reasonable. Note that morale isn't as straightforward as one thinks it is (there are 4-5 several values that influence each other for mercs, and AI morale works different again). Morale influences surrender strength, but unless you know the other values of the soldier (and those of your team), morale is not a good indicator of wether the enemy will surrender or not.
Acqsen
Feature2
Capturing and Sending Police to prison (and other hostile civilians)
more explanation on this in capturing topic here
Answer in that thread.
Acqsen
Feautre3
Slow/reduce Merc dying by introducing negative hp's
How it would work:
-merc hp_max=60, shot for 65, drops down with -5hp.
-looses x each turn (the old way)
-each turn x% of insta death
-drops to -10hp = 50%death
-drops to -20hp = 100%death (15 is max_hp/3)
why i ask this

The current system already does what you want. If your HPs drop below 15, a merc is dying - he loses consciousness and is helpless. As he'll bleed at that point, he'll bleed to death without assistance.
Instadeath on mercs is a bad idea imho. Your merc is already dying in a few turns. Why the need for a sudden chance of even faster death?


Re: Absurdly small code changes[message #324320] Sun, 25 August 2013 15:17 Go to previous messageGo to next message
Flugente

 
Messages:3461
Registered:April 2009
Location: Germany
As of r6315 and GameDir r1738, the icons for assignments (and a few other states,like drugged, hungry etc.) are now in a separate library, an thus independent from face gear icons. Which has the added bonus that we don't need to add the same icon to 4 libraries if we want to add a new one.

That GameDir is required for that exe. Not having the lib will crash the game.


Re: Absurdly small code changes[message #324323] Sun, 25 August 2013 17:50 Go to previous messageGo to next message
silversurfer

 
Messages:2613
Registered:May 2009
Flugente, what have you done?

Now my mercs are (from left to right):

http://img856.imageshack.us/img856/1817/dyn4.png

- drunk when wearing sun goggles together with extended ear
- moving equipment when using sun goggles only
- hungry when using NV goggles

At least those icons are shown. The mercs aren't actually doing any of this. They are assigned to squad 1.

Using GameDir 1738 and Exe 6316. Problem already happened with 6315.

These are my game settings:

- not using food system

Ja2_Options.Ini:
- TACTICAL_FACE_ICON_STYLE = 0
- SHOW_CAMOUFLAGE_FACES = TRUE

Ingame Options:
- Show Face Gear Graphics = checked
- Show Face Gear Icons = checked

[Updated on: Sun, 25 August 2013 17:55] by Moderator


Re: Absurdly small code changes[message #324324] Sun, 25 August 2013 17:57 Go to previous messageGo to next message
Flugente

 
Messages:3461
Registered:April 2009
Location: Germany
? Now that doesn't make sense... seems like some icons are overwritten... ??? I'm on it.

Edit: Fixed in r6317.

[Updated on: Sun, 25 August 2013 18:29] by Moderator



Re: Absurdly small code changes[message #324325] Sun, 25 August 2013 18:33 Go to previous messageGo to next message
silversurfer

 
Messages:2613
Registered:May 2009
I think that I found something. In Tactical\Faces.cpp starting from line 1818 the face graphics and icons are defined.

1. A matrix is used to defined the face gear.
2. The same matrix is used to define the icon for the face gear. For example my searge uses sun goggles + extended ear. Icon index in that case is 18.
3. No other options apply (food, assignment, whatever...). Icon index is still 18.
4. On line 2306 you display icon index 18 from guiASSIGNMENTICONS which is "drunk" and not the icon for the face gear anymore. Sad

edit: Too slow... Very Happy

edit2: Looks fine now. Smile

[Updated on: Sun, 25 August 2013 18:38] by Moderator


Re: Absurdly small code changes[message #324326] Sun, 25 August 2013 18:34 Go to previous messageGo to next message
Flugente

 
Messages:3461
Registered:April 2009
Location: Germany
Yes, fixed that.


Re: Absurdly small code changes[message #324349] Mon, 26 August 2013 14:49 Go to previous messageGo to next message
acqsen

 
Messages:17
Registered:December 2011
@Flugente, thx for the answers

Energy and morale.
Hoping Energy will be in the tooltip in the future then
Morale too complicated, oh ok.

Slower dying with negative hps.
Maybe its not that good idea after all.
Re: Absurdly small code changes[message #324365] Tue, 27 August 2013 00:41 Go to previous messageGo to next message
Flugente

 
Messages:3461
Registered:April 2009
Location: Germany
As of r6323 an GameDir r1739,
SOLDIER_TOOLTIP_DISPLAY_ENERGY    = TRUE
SOLDIER_TOOLTIP_DISPLAY_MORALE    = TRUE
control wether energy and morale are shown. Keep in mind that morale is a bit more complicated than just that value though.


Re: Absurdly small code changes[message #324488] Fri, 30 August 2013 13:27 Go to previous messageGo to next message
krux

 
Messages:62
Registered:June 2011
Personally I like the dying / bleeding idea (not insta-death though). An option that increases the chance of getting the dying state instead of being killed would be pretty cool. Saving guys from bleeding out is interesting gameplay-wise, while instant kills often makes me just load an earlier save. An option to alter the bleeding speed would be cool too.
Re: Absurdly small code changes[message #324506] Fri, 30 August 2013 17:06 Go to previous messageGo to next message
acqsen

 
Messages:17
Registered:December 2011
@Flugente, thanks for the changes.
If you had some time to waste, could you explain how the enemy morale system works?

@krux, that is exactly what i wanted,. slower dying, less insta kills. Maybe someone will crystalize into a more clean idea/code.
Re: Absurdly small code changes[message #324608] Mon, 02 September 2013 21:25 Go to previous messageGo to next message
Flugente

 
Messages:3461
Registered:April 2009
Location: Germany
Buggler added the option to move 5 militia at once in the militia redistribution screen. Press 'Ctrl' while clicking to do this.

Moving all militia works by pressing 'Shift', as I am sure nobody ever knew (I sure didn't).


Re: Absurdly small code changes[message #324609] Mon, 02 September 2013 21:35 Go to previous messageGo to next message
Uriens

 
Messages:333
Registered:July 2006
I discovered shift moving just a week ago. Extremely useful for me, I may add.
Re: Absurdly small code changes[message #324648] Tue, 03 September 2013 12:41 Go to previous messageGo to next message
RoWa21

 
Messages:2030
Registered:October 2005
Location: Austria
Flugente
Buggler added the option to move 5 militia at once in the militia redistribution screen. Press 'Ctrl' while clicking to do this.

Moving all militia works by pressing 'Shift', as I am sure nobody ever knew (I sure didn't).


We should definitly add those and many other useful things to the "Data-1.13\TableData\LoadScreenHints.xml" file. Any volunteers? If someone works on this, please use the following existing thread:
http://www.bears-pit.com/board/ubbthreads.php/ubb/showflat/Number/318528/Searchpage/1/Main/20057/Words/LoadScreenHints.xml/Search/true/Re_Hints_on_Loading_Screens.html#Post318528

[Updated on: Tue, 03 September 2013 12:45] by Moderator



Re: Absurdly small code changes[message #324789] Thu, 05 September 2013 15:59 Go to previous messageGo to next message
Parkan

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

How I know with some IOv features like adding plates to LBE vest is any of modders can add such thing to stock LBE vests of mod 1.13?I know such option is easy to make via xml editor but how i know xml editor can broke some things,and do this manually-a little problem as for me.

So,can modders add possibility to attach stock plates(ceramic,titanium)to stock lbe vests(Lbe gear vest,Russian lbe vest,etc)?
Re: Absurdly small code changes[message #324791] Thu, 05 September 2013 16:24 Go to previous messageGo to next message
Wil473

 
Messages:2861
Registered:September 2004
Location: Canada
Three of AFS v4.48's LBE chest rigs (the M-LBE ones) can fit plates. Not sure if I want to expand on this too quickly as I am concerned about balance - will the plates stack as the attachments are on different items? I remember that plate armour values do not stack on the same vest (that is if multiple plates were allowed by attachment compatibilities/incompatibilites).

EDIT: speaking of which, I should have the v4.48 preview for AFS done by later today.

[Updated on: Thu, 05 September 2013 16:24] by Moderator



Re: Absurdly small code changes[message #324792] Thu, 05 September 2013 16:44 Go to previous messageGo to next message
Parkan

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

I am talked about stock items in stock 1.13 mod.AFS,AIMNAS and other modifications-modders wish.


I maded such changes for myself via xml editor and checked in game.Plates add % armor to player and sometimes get damage.So i think it work.

[Updated on: Thu, 05 September 2013 16:47] by Moderator

Re: Absurdly small code changes[message #324803] Thu, 05 September 2013 23:05 Go to previous messageGo to next message
Flugente

 
Messages:3461
Registered:April 2009
Location: Germany
Moa added various fixes today, among them this:

Flat backpack malus replaced with malus which scales linear with weight of backpack up to maximum specified in ini file. Each 5 kg 1 additional malus is applied for movement. When carrying pack in hands or inside another pocket the full malus is applied. Malus for changing stances is still 1 additional Point when carrying backpack (does not matter in which slot).

This setting is controlled by BACKPACKWEIGHT_LOWERS_AP.


Re: Absurdly small code changes[message #325316] Tue, 17 September 2013 22:35 Go to previous messageGo to next message
Flugente

 
Messages:3461
Registered:April 2009
Location: Germany
As of r6413, mercenaries can now walk in formations when more than one of them is selected. If this option is on and you have selected multiple mercs, they will try to keep their relative distance to each other when arriving at their target location.

http://i39.tinypic.com/wba2b5.jpg
We order a movement command...

http://i40.tinypic.com/1570u4y.jpg
... and the mercs keep their relative positions.

Note that due to different walking speed, they might not be in formation when walking, but will be once they arrive. Should the location a merc should walk to be inaccessible (rocks/trees/other people), they will instead walk to a nearby tile.

By this, you can order your squad to form whatever formation you want, and then walk while keeping it.

This option can be toggled with [CTRL] + [Shift] + [g].


Re: Absurdly small code changes[message #325318] Tue, 17 September 2013 22:36 Go to previous messageGo to next message
lockie

 
Messages:3897
Registered:February 2006
Location: Scotland
OOh , like it ! :wave:


Re: Absurdly small code changes[message #325322] Tue, 17 September 2013 23:49 Go to previous messageGo to next message
silversurfer

 
Messages:2613
Registered:May 2009
Unbelievable! :bow:

Re: Absurdly small code changes[message #325323] Tue, 17 September 2013 23:51 Go to previous messageGo to next message
Sam Hotte

 
Messages:2010
Registered:March 2009
Location: Middle of Germany
:super:
Re: Absurdly small code changes[message #325330] Wed, 18 September 2013 04:16 Go to previous messageGo to next message
pheloncab

 
Messages:282
Registered:August 2004
Location: So. Cal. or texas
YEAH.... another work of art

:venus:








:cheers:
Re: Absurdly small code changes[message #325354] Wed, 18 September 2013 15:09 Go to previous messageGo to next message
Zombiehunter

 
Messages:185
Registered:March 2011
Location: Franconia, Germany
Flugente, you never stop to amaze me =)
Re: Absurdly small code changes[message #325397] Thu, 19 September 2013 10:41 Go to previous messageGo to next message
Randok

 
Messages:324
Registered:March 2004
Super. With this option, you can easily find the last enemy. Especially in large sectors (360x360) forest, grassland or night.
Thank you Smile
Re: Absurdly small code changes[message #325479] Fri, 20 September 2013 20:31 Go to previous messageGo to next message
Slax

 
Messages:1449
Registered:July 2006
Location: People riding polar bears...
Oh man, this is gonna make things so much quicker.
Flugente, for everything you've done... I owe you, man! I'll... I'll...

Give me a theme. I'll draw you something. Very Happy

Re: Absurdly small code changes[message #325483] Sat, 21 September 2013 00:11 Go to previous messageGo to next message
Flugente

 
Messages:3461
Registered:April 2009
Location: Germany
@Slax: Well, if that's an offer... For an upcoming feature, I need a picture of the earth globe getting impaled by a ballpoint pen. If possible, with blood dripping out of it, symbolising the eternal suffering of mankind.

It will make sense in the context.


Re: Absurdly small code changes[message #325507] Sat, 21 September 2013 18:36 Go to previous messageGo to next message
lockie

 
Messages:3897
Registered:February 2006
Location: Scotland
Quote:
For an upcoming feature, I need a picture of the earth globe getting impaled by a ballpoint pen. If possible, with blood dripping out of it, symbolising the eternal suffering of mankind.


Honestly , I dread to think .... :scary: Smile


Re: Absurdly small code changes[message #325509] Sat, 21 September 2013 19:38 Go to previous messageGo to next message
Slax

 
Messages:1449
Registered:July 2006
Location: People riding polar bears...
Sounds good. And easy enough. Very Happy
Could pull some Photoshop magic or draw from scratch. Bit busy right now but I'll have something soon.

Re: Absurdly small code changes[message #325537] Sun, 22 September 2013 21:51 Go to previous messageGo to next message
silversurfer

 
Messages:2613
Registered:May 2009
Revision 6430 (GameDir 1784) contains a new bonus for the Ranger trait.

FIRING_SPEED_BONUS_SHOTGUNS in Skills_Settings.INI is a percentage reduction in APs to fire a shotgun.

The default is 10 (possible values: 0 to 45). It's supposed to make the trait and shotguns a little more useful and gives shotguns a bonus that the other weapon proficiencies already have.

Re: Absurdly small code changes[message #325660] Wed, 25 September 2013 04:54 Go to previous messageGo to next message
Moa

 
Messages:58
Registered:September 2013
An overside on my part: I changed some time ago the clock mouse regions in rev6316 and missed something: when clicking on allready paused clock in strategic map screen the region moves 1 pixel to top and left.

line#1172 in Strategic/Game Clock.cpp
-		CreateMouseRegionForPauseOfClock( sX, sY );
+		CreateMouseRegionForPauseOfClock( sX + CLOCK_REGION_OFFSET_X, sY + CLOCK_REGION_OFFSET_Y );
Re: Absurdly small code changes[message #325668] Wed, 25 September 2013 10:06 Go to previous messageGo to next message
silversurfer

 
Messages:2613
Registered:May 2009
Moa
An overside on my part: I changed some time ago the clock mouse regions in rev6316 and missed something: when clicking on allready paused clock in strategic map screen the region moves 1 pixel to top and left.

line#1172 in Strategic/Game Clock.cpp
-		CreateMouseRegionForPauseOfClock( sX, sY );
+		CreateMouseRegionForPauseOfClock( sX + CLOCK_REGION_OFFSET_X, sY + CLOCK_REGION_OFFSET_Y );


Committed in revision 6441.

Re: Absurdly small code changes[message #326812] Sat, 19 October 2013 06:54 Go to previous messageGo to next message
Moa

 
Messages:58
Registered:September 2013
Alot of changes, but hopefully nobody will notice the difference Wink

-SGP debugging now works again (corrected some typos and one missing include).
-Memmory debugging works again (wrong types corrected)
-Laptop screen heigth macro and all references is now usable. (was 'C: y + A' 'D: B - C' which translates to 'D: B - y + A' instead of 'D: B - y - A')
-Laptop screens do not need to rerender as often then before as the laptop screen width/heigth macros works now and invalidating screen will do the trick -> almost no render calls neccessary.
-MercProfile.ubMiscFlag was used instead of .ubMiscFlag2 -> enter sector action schedule for soldiers which dont need to be insertered is now canceled as intended.does it solve the long delay on entering sector via tactical? probably not, but something is now working (differently) Embarrassed


http://www.file-upload.net/download-8193881/SGPdebug_Typos_LaptopRegionDefine.patch.html

Toggle Spoiler

Re: Absurdly small code changes[message #326826] Sat, 19 October 2013 16:05 Go to previous messageGo to next message
RoWa21

 
Messages:2030
Registered:October 2005
Location: Austria
@Moa: Nice fixes. I have just committed.


Re: Absurdly small code changes[message #326973] Tue, 22 October 2013 12:14 Go to previous messageGo to next message
Moa

 
Messages:58
Registered:September 2013
Thanks for committing Rowa.

using SGP_VIDEO_DEBUGGING define in builddefines.h will work when changing following in vobjct.cpp line# 67
-#define USE_HASHMAP_FOR_VOBJECTS 
+#ifndef SGP_VIDEO_DEBUGGING
+	#define USE_HASHMAP_FOR_VOBJECTS 
+#endif


Hitting key [ctrl] + [v] in debug build will write the data into file SGPVideoDump.txt

This shows at least 2 instances of not removed video objects. To reproduce f.i. open and close laptop couple of times.
1 vSurface (Handle: guiPOPUPTEX)
1 vObj (Handle: guiMAPINV)

to fix guiMAPINV: mapscreen.cpp line# 4872
-}
-CHECKF(AddVideoObject(&VObjectDesc, &guiMAPINV));
+CHECKF(AddVideoObject(&VObjectDesc, &guiMAPINV));
+}


guiPOPUPTEX is used by popups, so uncommenting lines #8485 and #13262 will probably not work. Just leave it as a known issue I guess.
Re: Absurdly small code changes[message #327017] Wed, 23 October 2013 09:57 Go to previous messageGo to next message
RoWa21

 
Messages:2030
Registered:October 2005
Location: Austria
Moa

-#define USE_HASHMAP_FOR_VOBJECTS 
+#ifndef SGP_VIDEO_DEBUGGING
+	#define USE_HASHMAP_FOR_VOBJECTS 
+#endif



Committed

Moa

-}
-CHECKF(AddVideoObject(&VObjectDesc, &guiMAPINV));
+CHECKF(AddVideoObject(&VObjectDesc, &guiMAPINV));
+}



Committed


Re: Absurdly small code changes[message #327217] Sun, 27 October 2013 11:34 Go to previous messageGo to previous message
silversurfer

 
Messages:2613
Registered:May 2009
I just added three new modifiers to Ja2_Options.ini:

ADMIN_EQUIPMENT_QUALITY_MODIFIER = 0
REGULAR_EQUIPMENT_QUALITY_MODIFIER = 0
ELITE_EQUIPMENT_QUALITY_MODIFIER = 0

These work just like the modifiers for militia item quality and will improve/worsen enemy item quality. Set these to 10 for a hard landing in Arulco. Wink

Changes have been added to exe revision 6535 and GameDir 1844.

Previous Topic: New feature: additional dialogue
Next Topic: New feature: localized weather
Goto Forum:
  


Current Time: Fri Oct 18 10:04:24 EEST 2019

Total time taken to generate the page: 0.01647 seconds