project-navigation
Personal tools

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - DexCisco

Pages: [1]
1
Coding / Formula for TU penalty
« on: December 04, 2012, 06:22:37 am »
I mentioned here an alternative method of calculating the TU penalty.  Currently it adds 0 penalty if you are under 20% weight, 30% penalty if under 50% weight, and 60% penalty if over 50% weight.  This is simple, but it doesn't allow changes in inventory to matter unless it puts you over the threshold.

I found the code and figured out the formulas to use linear scales between 0%, the light weight penalty point, the heavy penalty point, and 100%.  Using this formula, every change in weight will likely change your total TUs by a little bit. 

from src\game\q_shared.h
Code: [Select]
#define GET_ENCUMBRANCE_PENALTY(weight, max) (1.0f - ((weight) > (max) * WEIGHT_HEAVY ? (((weight / (2.0f * max)) - WEIGHT_HEAVY) / (1.0f - WEIGHT_HEAVY) * (1.0f - WEIGHT_HEAVY_PENALTY)) + WEIGHT_HEAVY_PENALTY : (weight) > (max) * WEIGHT_LIGHT ? (((weight / (2.0f * max)) - WEIGHT_LIGHT) / (WEIGHT_HEAVY - WEIGHT_LIGHT) * (WEIGHT_HEAVY_PENALTY - WEIGHT_NORMAL_PENALTY)) + WEIGHT_NORMAL_PENALTY : (weight * WEIGHT_LIGHT) / (2.0f * max * WEIGHT_LIGHT)))
I also modified the penalties a bit because as they were they gave basically a straight line graph.  I changed it from 30% @ 20% to 20% @ 30%, and from 60% @ 50% to 70& @ 60%.  That puts a little bend in the graph, giving more bonus at light weights and more penalty at higher weights.  The linear method also carries the penalty right up to 100% @ 100%, so you can't do much if you are power lifting.  The numbers can be adjusted, obviously.

Attached is an ODS spreadsheet with the linear and threshold numbers if you want to play with it.

2
Sounds and Music / A facelift for footsteps/terrain
« on: November 21, 2012, 01:06:14 am »
While some of the footstep sounds are OK, many of them sound like someone whacking the ground with a stick.  There is also no variation in the step sounds, so they are all "clunk, clunk, clunk, clunk".  It would also be nice if the sounds could be standardized a bit more in terms of length and the general footfall sound so they blend together better.  I have been looking at the terrain.ufo file, as well as the team_*.ufos.  The team ufos have lists of sound files for wounding and dying sounds for the various units.  I think the same thing could be done to the terrain.ufo, allowing each terrain to have multiple footstep sounds, perhaps with alternate sounds for crouched walking, heavy steps (like Ortnoks, Power Armor), spiders, tracked,  wheeled (UGVs) etc. as needed as well as grenade bounce sounds.  The code should be very similar to how the team defs are parsed and used.  Terrain.ufo also needs new entries for the added textures, as well as bouncefractions set in each.

I don't know that much C++, but I think I may be able to figure out well enough how to reuse the existing code to create the new structure.  It will still be a lot of work though.  Is anyone else working on something like this?

3
Newbie Coding / Missing DLL from codeblocks/minGW zip
« on: November 18, 2012, 01:31:47 am »
I have downloaded the codeblocks zip from this site and set it and Git and such up, downloaded the maps using the python script, and compiled the code successfully with codeblocks.  It seems to work OK right up until I enter a mission.  Then I get an error message about the DLL libgcc_s_dw2-1.dll being missing.  I searched the code files, the built files and the installed version for this dll, but it does not seem to be anywhere.  Apparently it is missing from the MinGW/bin directory in the codeblocks zip.  I found a copy in a fresh install of MinGW and copied that into the MinGW\bin directory that I use with Codeblocks and rebuilt.  That seemed to fix the problem.  I'm not sure if using the DLL from a different version of MinGW would cause other unforseen problems. 

Maybe the dll could be added to the zip so others don't run into the same issue.

4
If you have a soldier in the dropship equip soldiers screen that has armor on, if you right click on their armor or drag and drop it into the base inventory armor tab, the counter for the number of armor on hand does not go up.  If you exit the equip soldiers screen and go back in, the number is corrected.  Taking armor off and putting it back on after the first time seems to work OK, though the number on hand will be 1 too low until you exit the screen.  The items don't seem to be lost, just the number in the UI is not updated the first time you remove armor from an already armored soldier.

5
Bugs in stable version (2.5) / Transfer quantities
« on: November 08, 2012, 05:00:43 am »
I am getting to the mid- late-game now and I have really started to notice issues with transferring items between bases.  There seems to be a maximum quantity each item that you can transfer at one time.

e.g. I tried to transfer all my Alien Materials to one base to build a ship, (6+ Harvesters worth of materials for 1 fighter?) but I could only transfer them in batches of 10.  That makes transferring 5000 materials really tough.  I got around it by selling it all, then buying it all back at the destination, but even then, with no repeat on the quantity spinner, holding shift to transfer 2 with each click instead of 1, it took 500 clicks for 1000 materials to sell, then another 500 clicks to buy it again.  I assume that will be fixed by changing the spinners in the buy/sell screen, but I believe different buy/sell prices for items in the market is on the near horizon so that would be expensive.

Some items you can only transfer one of at a time, like ship components.  I think I could transfer 3 grenades at a time.  It seems to change depending on which base you start at and go to as well.  It is just odd and I'm not sure what the purpose of it is, if any.

Might be this:  http://sourceforge.net/p/ufoai/bugs/3406/


6
Bugs in stable version (2.5) / Aliens trying to shoot through walls
« on: November 08, 2012, 04:48:52 am »
Quite often I have noticed that aliens are trying to shoot me through walls.  It seems to happen quite often that they will shoot through the wall, then move around it to a place where they could have shot me if they had just moved first.  Is the problem maybe that they are just getting the execution order of their turn mixed up?  They intend to move then shoot, but they shoot then move instead?  They never try and reaction fire through walls, only on their turn so I doubt it is a faulty LOS/LOF issue.

7
Bugs in stable version (2.5) / Wounded soldiers bog the game
« on: November 08, 2012, 04:41:31 am »
I have noticed that after a while, switching to a wounded soldier starts to take longer and longer, until it can take 30 seconds to switch to them.  It may be triggered by checking the unit health screen that shows the heart rate and the !s that indicate wounds.  This is the only way that I can tell that a wounded soldier has been sufficiently healed that they will not bleed out anymore.  The !s turn to !s when the wound has been patched up completely.

I believe that after accessing this screen, switching to the unit gets caught in an ever-lengthening loop of some kind.  I have to play with it a bit more to narrow down the cause.  Is anyone else using the health screen to check wounds?

Console log seems to indicate that it is calling hud_updateactorwounds a LOT.  So much that it overflows the 4k buffer.

Another method of indicating an untreated wound on a character would be nice now that the wound system has been implemented, as well as tooltips to indicate what effects each wound has (increased move time, lower accuracy, slower reactions, spontaneous cursing, jellybean cravings...)

8
Tactics / Harvesters and AI Pathfinding
« on: November 08, 2012, 04:29:38 am »
I have found that it can be easy to trap all the aliens in the UFO if you are on a map with a landed Harvester.  Run one man up to the front of the Harvester, right next to the front chambers.  The aliens all can see you somehow and will try to get you, but they can't figure out that they have to leave the UFO first.  They all congregate in the forward compartments, right next to your man.  Clear the area, then move the rest of your team around the back and set up a kill zone.  Then move the man up front away from the UFO and the aliens will head toward the rest of your men out back.  You can sometimes regulate how many aliens will leave by how far away you move and by moving back after a turn.

It's cheesy, but I look forward to the day that it doesn't work because the AI can pathfind out of areas with limited access.

Pages: [1]