Regression: Some vessels cannot reload their mounted guns

Find any bugs in Vega Strike? See if someone has already found it, or report them here!

Regression: Some vessels cannot reload their mounted guns

Postby crome » Thu Oct 17, 2019 1:07 pm

Most vessels cannot reload their mounted guns in the current development branch. I am attaching a screenshot of a "Progeny" which proves that it cannot reload the "Razor" and the "MiniDriver" even though both weapons are almost out of ammo:
0_impossible_to_reload_razor_and_minidriver.png


The few vessels that can reload their guns cannot do it consistently. I will try to explain the problem as best I can.

Currently the amount of ammunition that can be reloaded for a mounted gun is determined in the same way as the maximum amount of missiles that can be loaded in a missile slot. First the volume which the ammunition requires is caluclated - (ammount of bullets) x (volume per bullet). If the volume is less than the available volume of the mount slot on which the gun is mounted then the ammunition is added, otherwise not.

One issue with the current method is the game play factor. Some volume capacities are so high that one can carry a ridiculous amount of ammunition, e.g., the initial Llama can carry up to 30000 rounds for the IonBurster. This amount nearly eliminates the need to save ammunition when engaging enemies. At this point ammunition may just as well be considered unlimited, which is detrimental to the game play experience.

A bigger issue is on the technical side. When reloading a mounted gun there are three values that must be consistent:

- the volume per bullet
- the overall volume capacity of the mount slot
- the initial amount of ammunition when the gun is purchased

The information required is spread out over three different files:

- Assets-Production/weapon_list.xml
- Assets-Production/units/vessels.csv
- Assets-Production/units/weapons.csv

A change in any of those files might lead to inconsistent behaviour with regard to ammunition capacity. E.g., the Llama which the player has at the beginning of a campaign can load up to 30000 rounds for the IonBurster in its first two slots, yet only 6000 rounds its 3rd and 4th slots. The initial amount of rounds after purchasing an IonBurster, however, is 10000 rounds.
1_new_ionburster_cannot_reload.png

This means, if the IonBurster is mounted in the 3rd or 4th slot then it cannot be reloaded until it falls under 6000 rounds.
2_reload_after_ammo_less_than_6000.png

After that it can only be reloaded up to a maximum of 6000 rounds. This is inconsistent.
3_cannot_reload_more_than_6000_rounds.png

If a vessel does not have a volume entry in a mount then the gun cannot be reloaded at all.

A less error prone approach is to only consider the max ammo limit for each gun defined in Assets-Production/units/weapons.csv, regardless on which vessel it is mounted. Only for missiles will the volume capacity of a missile slot retain its current behaviour.

Since the volume capacity for gun-mounts has been removed for most ships in Assets-Production I think this is the direction that development was intended to go before it came to a halt.

I am making a pull-request with the needed changes to achieve the proposed behaviour:

- Missile capacity will remain based on the volume capacity of the missile slot
- Gun capacity will be determined solely based on the gun type, i.e., the entry corresponding entry in Assets-Production/units/weapons.csv


Please let me know if I missed something or if there are objections for my proposal.
crome
Explorer
Explorer
 
Posts: 13
Topics: 5
Joined: Wed Mar 18, 2009 11:31 am

Share On:

Share on Facebook Facebook Share on Twitter Twitter Share on Digg Digg

Re: Regression: Some vessels cannot reload their mounted gun

Postby loki1950 » Thu Oct 17, 2019 3:04 pm

You also may have been at a port that does not stock said ammo :shock: inventory levels are in the master_parts_list IIRC there was an ongoing project to rationalise all of the csv based files which did a face plant with the lack of commit access.How are you editing the csv files as using a spreadsheet app(Excel/calc) you have to be very careful in saving the edits to not change the format.

Enjoy the Choice :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2
User avatar
loki1950
The Shepherd
 
Posts: 5755
Topics: 52
Joined: Fri May 13, 2005 1:37 pm
Location: Ottawa

Re: Regression: Some vessels cannot reload their mounted gun

Postby crome » Fri Oct 18, 2019 9:23 am

The ammo ("MiniDriver" and "Razor Warheads") is there as can be seen in the left background of the first screenshot. It would be white if it were possible to purchase it, but it is brown-redish because of the current bug. As far as I have seen there is no more master_parts_list. There was until release 0.5.1.r1 but in the current version the information has been spread out over several *.csv files, as can be seen here: https://github.com/vegastrike/Assets-Pr ... ster/units

I did not edit any of those *.csv files. Whoever made the split back then removed the information for volume on gun-mounts. I think this was done on purpose in order to handle gun-mounts in a more maintainable manner. It is a work in progress that has not seen some progress in some time :)
This is why I am proposing the code-based fix instead of "correcting" the *.csv files.
crome
Explorer
Explorer
 
Posts: 13
Topics: 5
Joined: Wed Mar 18, 2009 11:31 am

Re: Regression: Some vessels cannot reload their mounted gun

Postby loki1950 » Fri Oct 18, 2019 9:40 am

Indeed a code based strategy may be best as I seen on your pull request BTW for creating and verifying unit csv files the UnitConverter in the tools repo works quite well though it's dependence on mesher makes it currently unusable as mesher is broken it's Ogre functions.

Enjoy the Choice :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2
User avatar
loki1950
The Shepherd
 
Posts: 5755
Topics: 52
Joined: Fri May 13, 2005 1:37 pm
Location: Ottawa


Return to Bug Triage

Who is online

Users browsing this forum: No registered users and 1 guest

cron