1dot13 / source Goto Github PK
View Code? Open in Web Editor NEWSource code for the game executable of the Jagged Alliance 2 v1.13 project
Source code for the game executable of the Jagged Alliance 2 v1.13 project
Snitches are the only way to prevent other mercs from drug abuse and/or stealing.
And they don't do that anymore. Player can't prevent misbehaviour.
Even when I put four snitches together with one drug abuse merc, drug abuse won't stop.
Only way to solve this is to delete the misbehaviour tags in backgrounds.xml, which doesn't make much sense.
Seen reports by other users and tested myself with 11.12.2022 (12c7781)
Item szItemName allowed length is 80 but names shorter than that will crash the game straight to desktop when trying to open sector inventory in strategic map view. Didn't check yet what the critical length is.
When setting this feature to FALSE in ja2options.ini and equipping binocs, the LOS goes on forever so when you scroll to the border of the map it produces a memory allocation error (see screenshot)
Error should be rather easy to replicate:
The merc's LOS is about 2 screen lengths to the left that's how far this is..
Hello,
In the video at 0700 I take a shot, then a few seconds later I take a 2nd shot, it misses and hits the boat which should've blown up, instead it does the water explosion and the graphic stays the same.
Screenshot shows the JSD, link to the vid: https://file.io/Zx3wqdXTniWH
when adding the c'n'c-stuff to source, GameVersion.cpp has seen no update, so we're one number behind
the comment in GameVersion says YY.MM.DD but the entry is DD.MM.YY
should we even fix the revision number (add up two numners next time?) ?
should we go back to previous kind of date in next commit (yy.mm.dd) ?
mentioning because i plan to upload a SCI and would like to keep the old naming convention
might be simular to issue #10 , but it's more about drops, not what they wear
it's possible to gain full end game gear (weapons, armour, kits, crafting items, etc. - everything) for a team of mercs as early as drassen with drop-all and many elite encounters
amount of elite encounters was high due to my settings, but it's still excessive
neither CoolnessBySector nor game progress seem to have any impact on drop choices with drop all
gonna do some testruns with basic ini-settings but drastic changes to related xmls (Enemy.....Choices.xmls, the drop-xmls, coolness by sector) to see if any of that is giving a respond ingame and/or testruns on older versions to compare
How to replicate: Place someone in a vehicle in tactical mode, save and load the game.
Then the game continuously pops up a box informing that the Hummer thinks it is in group A but isn't and group B in same sector thinks hummer is in the group but isn't. Only way to continue the game is to use the short pauses between a new popup box appearing and remove soldier from inside vehicle
As per bio's original comment in RenderTiles(), the selection of proper animation surfaces to show should be moved out of the hot render loop.
// TODO: should find a better place to determine the logical body type. This function gets called like a gazillion times
// every render cycle and the find provedure will get quite expensive at later stages (lots of logical body types, animations and filters!)
// Should only be done once every cycle, or better yet, only and directly after a SOLDIERTYPE object has been altered (if at all possible)!
How to replicate: In Drassen, assign someone to helicopter, go to tactical and move the mouse to any map edge.
Game will crash due to nullptr dereference in strategicmap.cpp line 4941 when GetSoldierStructureForVehicle returns 0 for the soldier who's inside helicopter.
if ( OK_CONTROLLABLE_MERC( pSoldier ) && (pSoldier->bAssignment == CurrentSquad( ) || (pSoldier->bAssignment == VEHICLE && GetSoldierStructureForVehicle( pSoldier->iVehicleId )->bAssignment == CurrentSquad( ))) )
Version: latest build 57fcdaf.
It seems that feature to enable militia use sector equipment is broken and not working as it is supposed to.
I am referring to this particular option in Ja2_Options.ini:
if set to true, militia will take parts of its equipment from a sector's inventory.
MILITIA_USE_SECTOR_EQUIPMENT = TRUE
The way it's supposed to work, according to feature description, is that militia will pick up guns and armor from sector inventory unless you Tab + Lmb click on a particular item to be avoided by militia. This a very interesting feature and makes arming militia more fun, but sadly it doesn't work as it is supposed to and costed me several failed runs, until I have identified that my militia was just ditching items and getting naked after a while resulting in lost combat engagements.
According to description on forums and in .ini file this feature makes militia pick items from sector inventory up after they have spawned when you've finished training them. They actually do pickup items successfully, but after a while in game, they get rid of all items and engage in fighting completely naked and essentially worthless, making militia completely useless for guard duty.
Here are some screenshots:
Right after spawning Militia is armed and they've picked up most of the guns that were lying around in sector inventory.
Day has passed in game, the same militia operatives (no new militia were trained or spawned) are now naked:
Naturally, it gets quite ugly during the fights and you expect your militia armed with weapons you left them:
This feature supposed to make equipping militia harder but potentially making them deadlier if equipped with superior gear, but because they ditch items, it's broken and militia is useless when you play with this option.
I have also attached archive with 2 savegames to reproduce the error.
Savegame04.sav > Militia successfully equipped weapons after training.
Savegame05.save > A day in-game has passed, militia has no items equipped and is running around naked.
Hello !
If possible (and I can assist with this just not sure where to start in the source as I have a feeling the INTs need to be changed) I would like to be able to set MIN/MAX hires for each category.
For example:
You can hire
16 AIM max
16 MERC max
8 IMP max
Stuff like that, It would be nice if we can hire up to 48 or 64 mercs as I plan to have massive battles in my mod.
Another line of reasoning is that AIM will be my 'combat' guys, MERC will be the 'maintenance' guys that staff facilities etc
So by setting MIN/MAXes like that we can play with the categories as well as force players to vary their choices
Thank you
First use case that requires this functionality is to show both balaclava and a helmet/hat on the merc simultaneously. Currently I can only match against what item is in the head armor slot, but not any of the helmet's attachments.
Another one would be to show kneepads when they are attached to leg armor.
at hiring page, the names are ascending by default
could the names be changed to descending (A-Z) as default ?
it's kinda unintuitive to see a name list sorted by Z-A as it is now
Dear coders.I have some question to you all who made changes in 1.13 code.
There was a coder with nickname Shadow,and how i understand he stop developing\helping to impove 1.13 code.
He add an intresting addition God Mod and permament working cheats.The god mode feature working great but it has few flaws:
1.It made immortal all npc,militia and enemy when during fights only player mercs can damage them all(enemy,militia,npc) but enemy\militia \tigers\bugs dont do any damage to anyone else so during fight only player can kill all and not others.Enemy\militia can't do any fire damage to each other but only can do melee damage.
2.During autoresolve battles mercs equipment get damage(armor,weapons)but not during tactical battles(armor)
Can those things can be fixed\tweaked?It it even posible?
Explosions seem to cause excessive loyalty loss during battles in city sectors. Reported for r9141
See: https://thepit.ja-galaxy-forum.com/index.php?t=msg&th=25081&goto=364929&#msg_364929
and https://imgur.com/a/atu5loN
Maybe it's time to add a README.md file with a description of the project and other information, the readme.txt file that is in place right now is old and missing information.
How to replicate: In tactical mode, put a soldier inside a vehicle, eg. ice cream truck and force move it through buildings with shift+click until it explodes.
Intact vehicle graphics are not properly removed from the tactical map, unlike merc graphics are which results in undamaged vehicle graphics being shown under the vehicle corpse graphics. Proper fix requires going through the code and finding out where the removal of vehicle from the tactical map goes wrong. If the vehicle is removed from the merc list in strategic map, the vehicle graphics disappear from tactical map as well.
RemoveMerc() returns FALSE due to not finding the vehicle pSoldier in gpWorldLevelData[ iMapIndex ].pLevelNodes[5] for the sGridNo that the vehicle is supposed to be on. Maybe a mismatch of where the structure in world is not yet updated to the vehicle's current gridno when it gets destroyed? This bug does happen when the vehicle is moving in tactical
action items (LuaInitNPCs.cpp and actionitems.xml and exposions.lua) can be place via mapeditor and result in a variety of things happen when triggered ("trigger" at items in mapeditor).
If there would be a way to trigger light effects using those, it could enhance mapediting.
what comes to mind are things like a switch that turns on light in a dark room or a searchlight of a prison guardtower, etc.
There certainly would be multiple ways to use it.
A flashlight effect would be a better fit for something like a searchlight (beam), light in room may would need another kind of effect.
How to replicate: Fly helicopter through hostile sectors until it is shot down, with the map display mode set such that if clause in Map Screen Interface.cpp on line 6735 evaluates to true. Then the Assert on line 6738 gets triggered.
if ( gusMapDisplayColourMode != MAP_DISPLAY_AIRSPACE && gusMapDisplayColourMode != MAP_DISPLAY_AIRSPACE_COLOURED_SAMS ) { // can't use his profile, he's where his chopper is Assert( iHelicopterVehicleId != -1 ); gsSectorLocatorX = pVehicleList[ iHelicopterVehicleId ].sSectorX; gsSectorLocatorY = pVehicleList[ iHelicopterVehicleId ].sSectorY; }
How to replicate: When using sector equipment for militia, TAB + click on items to prohibit them from picking some items, then sort the sector inventory. The prohibitions stay in their original slots, even if the item in question was moved to another slot due to sorting. Militia is now able to pick up said item again.
Related to the change in #41
If an enemy wears a backpack and was spawned on roof, the pathfinding keeps deadlocking every time they attempt to drop down from the roof, essentially rendering said soldier useless. Have had it happen a couple of times now.
Offering to surrender does not stop the combat properly, which results the game not able to progress after surrendering
Bonus points for adding a way to briefly highlight or ping player mercs as a replacement for artificial lights
Compress time on the attached save and assertion error will be triggered on line 6884 in strategic AI.cpp.
pSector->ubNumElites == 0 but the previous call to CalcNumTroopsBasedOnComposition( &ubNumTroops, &ubNumElites, ubSize, iCompositionID ); sets the local variable ubNumElites to 7.
Waldo can repair the Heli
For land vehicles, player has to rely mostly on Trevor, most of the other mechanic dudes fail to have the required skills (wahtever those are, my guess a combination of engineer + high wisdom)
Make them all as good as Trevor sounds like a bad idea.
If it's possible, it might would be cool to allow Fredo or the Blacksmith in Grumm to repair land vehicles the way Waldo can with Heli.
Having Tixa as additional place for POW happening after we surrender our mercs is nice, but this part sucks big:
"fix: all mercs in the map will be taken POW when surrendered, however only 3 will appear in Alma/Tixa/N7, rest will be POW forever without chance of getting free"
Why doing this? Who would use the surrender if that is happening? The escape has been a fun side-quest, but when it results in mercs being lost for good, without a chance to free them, why would anybody use this?
I tried to revert this in my local copy, but it seems there are commits before (and maybe also after) that deal with this and I can't find out which files apart from the one at r9095 need to be reverted (comments on this are not always helpful, seem to miss some stuff).
I also didn't understand why it was nescessary to make this more-than-three cap, beyond my skill to find that out.
Like I said, it's a nice addition, but loosing mercs permanently without a chance is just bad, imo.
Revision: 9095
Author: Shadooow
Date: Montag, 21. Juni 2021 15:53:56
Message:
Major rework of getting captured quests and mechanics.
Modified : /trunk/GameSource/ja2_v1.13/Build/GameSettings.cpp
Modified : /trunk/GameSource/ja2_v1.13/Build/GameSettings.h
Modified : /trunk/GameSource/ja2_v1.13/Build/Strategic/Player Command.cpp
Modified : /trunk/GameSource/ja2_v1.13/Build/Strategic/Queen Command.cpp
Modified : /trunk/GameSource/ja2_v1.13/Build/Strategic/Quests.cpp
Modified : /trunk/GameSource/ja2_v1.13/Build/Strategic/Quests.h
Modified : /trunk/GameSource/ja2_v1.13/Build/Strategic/strategicmap.cpp
Modified : /trunk/GameSource/ja2_v1.13/Build/Tactical/Handle Doors.cpp
Modified : /trunk/GameSource/ja2_v1.13/Build/Tactical/Overhead.cpp
Modified : /trunk/GameSource/ja2_v1.13/Build/TacticalAI/DecideAction.cpp
Modified : /trunk/GameSource/ja2_v1.13/Build/TileEngine/Explosion Control.cpp
I've noticed that enabling factories causes a long and very noticeable delay whenever the hour ticks over. After stepping through HandleHourlyUpdate(), the biggest offender by far is this factory function - almost every other hourly update takes 1-2ms, with one or two approaching 10ms, but the HourlyFactoryUpdate() usually takes a whopping 500ms on my machine, even with no items in production.
hi there
get just a black window when trying to run in windowed mode on linux (steam version of ja2) using proton 7.0.5 on ubuntu 22.04 (using intel 10th gen igpu).
otherwise works great (other than you have to set the screen resolution of the display to the one configured in the game before starting it)! awesome work!
cheers
This leads to a runtime assertion error in debug build. The .sti file itself is fine and there is no repeatable file that does it, but it changes to different file.
Not a game breaking issue in release build as the assertion is disabled.
Maybe a smart idea to add a .gitignore file to the project with some folders and files in it to make sure we dont accidentally commit things we dont want to like a build directory and such things
There should be .gitignore templates available for visual studio projects somewhere
Admins should have minimal or no armour, depending on the player's SOLDIERS_ALWAYS_WEAR_ANY_ARMOR ini setting.
The game resorts to default values for invalid or missing INI settings, so we should make this text less scary.
At the very least Polish build crashes without exception upon encountering enemies after the first fight, with a "video object index is larger than number of subimages" assertion error. This one points to an outdated .sti file somewhere in the Polish gamedir.
We're also getting intermittent assertion failures in arms dealer init.cpp, line 1166: GetArmsDealerItemTypeFromItemNumber(), invalid class 0 for item 1762.adf 0.
The original code in filter.cpp has matching against skill traits such as radio operator, athletic etc commented out. I don't know if the implementation is broken or unfinished but re-enabling it would allows more opportunities to match merc graphics if modder needs it
I've been thinking about this for a little bit. There are some features where them being "off" is functionally no different from "on but unused", so it makes sense to me to keep them on and players can decide whether to utilise them. The main pain point is probably explaining to returning players that no, the features aren't gone, you just can't toggle them off anymore.
Any thoughts on this?
Some candidate features:
When shooting at an enemy, most of the time one tends to use max aim instead of no aim. It would be nice if we could have an option to toggle which aim level the shooting would default to. Taking available action points into account, of course.
There is a bug with tooltip about items in boby rays and in aim and merc characters inventory.for example boby ray descriptions of items will be a weapon which were last on previus page and will be show on other items after last weapon.same for aim inventory on aim site after weapons other items like lbe will be named like a weapon.tested on plain 1.13 and brainmod.
Just for testing tryed to play Vanilla version.Created 5 IMP chars.when they entered to sector they talked like Barry.But when creating them on character creation the voices shows normal.
Not a gamebreaking bug, because he'll eventually get removed from tactical as Queen reaches her destionation, but it's jarring to have him just disappear in front of player mercenaries.
Looking at the original XMLs for item and Gunchoices you will notice you have only 50 slots available for items and ubchoices is also only INT8.
Therefore if you wish to have more items, or add weight especially you are restricted to an even lesser pool.
RFTR has designed a solution that I've implemented for this.
Attached you will find the EDITED cpps, SearchAll
"Edited by Pr0ph3t for BWOW - RFTR / Asdow's 50 item/weapon choices UNCAP FIX"
for all my changes in order to get an impression of what has been done.
Please note this needs to be done for:
Militia as well
Perhaps Revise the IMPs in case
Enemy/Militia item drops
Here is a link to the files:
https://file.io/DkxCHvlofhrC
BUILD VERSION:
sc 7a0a567
gc 4648659
So, apparently, when you enable Generals in Ja2_Options.INI file or in override options of the game of the latest build you witness that Generals mode is not working as intended and returns errors to player and takes very long to process enemy turns (some people complained on discord that the game freezes forever) until it prints out the error message.
To replicate the error do the following:
Attached a screenshot of the error and log files, also my ini file.
Any lights we can attach to object are 1 color (gross white)
Would be nice if we can RGB individual lights rather than applying to the whole map
it seems the executable in the SCI's has the wrong name, this should be named ja2.exe to make sure it overwrites the original JA2 executable, people will run into issues staring the old exe and get confused if this file is not overwritten.
Could be removed from the code and subsequent .xml file as it's not used anywhere in the code.
Got same problem which i described before.there is 1 enemy soldier moving on map but when he attack a town there is appear 255 soldiers this was played with brainmod but i think it will be appear on plain 1.13 also because i got this here first time.Counter attacks and reinforcments are on.
Save file and settings in file.
QuickSave.zip
Ja2_Options.zip
If any explosion is strong enough to collapse roof, in addition to debris smoke, there is also white smoke added.
This is the white smoke of the fire extinguisher and is fire retardant.
Happens indoor, but result will happen also if initial explosion happen outdoor (outside wall of room).
Tested with action items, tnt, hmx, c1, c4 and mk2-grenade. As long as it results in roof collapse, we get fire retardant smoke in the room below the roof.
This isn't only looking ugly, since the smoke is fire retardant and blinding it interferes with other things we may wanna do.
This further hinders to add any new explosive with changed smoke effect. if we don't know the reason for this, we can't be sure that dsired new effect would happen as well.
Tried to look into this, but as far as i can tell, when the white smoke was added (r9141/g2602) nothing regarding roofs or indoor was changed (afaik).
the way ARC allows to assum intel is kinda unbalancing the blackmarket
same for spy at sector assignment
intel should be rare and the player need to active do something for it, imo
the blackmarket sells op gear and the way it is now, player can buy there as easy as at Tony
is there a way to balance this some more?
How to replicate: In tactical mode, put a soldier inside a vehicle, eg. ice cream truck and force move it through buildings with shift+click until it explodes.
nullptr dereference in renderworld.cpp GetShadeTable due to psoldier->sGridNo being -1, which is then used for array access. Simply preventing the nullptr dereference shows that intact vehicle graphics are not properly removed from the tactical map, unlike merc graphics are which results in undamaged vehicle graphics being shown under the vehicle corpse graphics. Proper fix requires going through the code and finding out where the removal of vehicle from the tactical map goes wrong. If the vehicle is removed from the merc list in strategic map, the vehicle graphics disappear from tactical map as well.
RemoveMerc() returns FALSE due to not finding the vehicle pSoldier in gpWorldLevelData[ iMapIndex ].pLevelNodes[5] for the sGridNo that the vehicle is supposed to be on. Maybe a mismatch of where the structure in world is not yet updated to the vehicle's current gridno when it gets destroyed? This bug does happen when the vehicle is moving in tactical
Hello currently in the ja2options.ini you have the following:
;------------------------------------------------------------------------------------------------------------------------------
; You can change the arrival sector of your first mercs. The defaults are X=9, Y=1 (for sector Omerta A9).
; Subsequent arrivals will occur as normal (whereever you set the arrival LZ on the map).
;
; Please note: If you set the arrival sector in enemy SAM-Site controlled area, it will automatically be moved to a safe
; airspace sector immediately after your initial arrival!!
;------------------------------------------------------------------------------------------------------------------------------
DEFAULT_ARRIVAL_SECTOR_X = 12
DEFAULT_ARRIVAL_SECTOR_Y = 1
Can you please make it so that we can specify basement sectors as well like so?
DEFAULT_ARRIVAL_SECTOR_X = 12
DEFAULT_ARRIVAL_SECTOR_Y = 1
DEFAULT_ARRIVAL_SECTOR_Z = 0 / 1 / 2 / 3 / 4 / 5 .....
If you'd like to also add the option to remove the initial merc entering.cpp Heli animation in the ja2options that would be great too. I can handle that though.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.