Automatic passenger deletion additions & fixes
- Added an option to base deletion interval on passenger cost instead of size, house filters, ability to toggle off recording kills to the transport as well as FlyingString display for refund.
Gunner=truetransports now correctly change their turret & weapon on deletion of a passenger.- Previously if passenger had no explicitly set
Soylentvalue, nothing would be refunded. The refund amount is now calculated in exactly same way asGrinding=truebuildings do it.
In addition, the documentation has been updated to be more elaborate.
- Transports can erase passengers over time. Passengers are deleted in order of entering the transport, from first to last.
PassengerDeletion.Ratedetermines the interval in game frames that it takes to erase a single passenger.- If
PassengerDeletion.Rate.SizeMultiplyis set to true, this time interval is multiplied by the passenger'sSize.
- If
PassengerDeletion.UseCostAsRate, if set to true, changes the time interval for erasing a passenger to be based on the passenger'sCost. This does not factor in modifiers likeFactoryPlant.PassengerDeletion.CostMultipliercan be used to modify the cost-based time interval.PassengerDeletion.CostRateCapcan be used to set a cap to the cost-based time interval.
PassengerDeletion.AllowedHousesdetermines which houses passengers can belong to be eligible for deletion.PassengerDeletion.DontScore, if set to true, makes it so that the deleted passengers are not counted as having been killed by the transport (no experience, not recorded towards owning house's score etc).- If
PassengerDeletion.Soylentis set to true, an amount of credits is refunded to the owner of the transport. The exact amount refunded is determined by the passengersSoylent, or if not set, itsCost(this is affected by modifiers such asFactoryPlant).PassengerDeletion.SoylentMultiplieris a direct multiplier applied to the refunded amount of credits.PassengerDeletion.SoylentAllowedHousesdetermines which houses passengers can belong to be eligible for refunding.PassengerDeletion.DisplaySoylentcan be set to true to display the amount of credits refunded on the transport.PassengerDeletion.DisplaySoylentToHousesdetermines which houses can see this andPassengerDeletion.DisplaySoylentOffsetcan be used to adjust the display offset.
PassengerDeletion.ReportSoundandPassengerDeletion.Animcan be used to specify a sound and animation to play when a passenger is erased, respectively.
In rulesmd.ini:
[SOMETECHNO] ; TechnoType
PassengerDeletion.Rate=0 ; integer, game frames
PassengerDeletion.Rate.SizeMultiply=true ; boolean
PassengerDeletion.UseCostAsRate=false ; boolean
PassengerDeletion.CostMultiplier=1.0 ; floating point value, percents or absolute
PassengerDeletion.CostRateCap= ; integer, game frames
PassengerDeletion.AllowedHouses=all ; Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all)
PassengerDeletion.DontScore=false ; boolean
PassengerDeletion.Soylent=false ; boolean
PassengerDeletion.SoylentMultiplier=1.0 ; float, percents or absolute
PassengerDeletion.SoylentAllowedHouses=enemies ; Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all)
PassengerDeletion.DisplaySoylent=false ; boolean
PassengerDeletion.DisplaySoylentToHouses=All ; Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all)
PassengerDeletion.DisplaySoylentOffset=0,0 ; X,Y, pixels relative to default
PassengerDeletion.ReportSound= ; Sound
PassengerDeletion.Anim= ; Animation
Nightly build for this pull request:
- compiled-dll-89143baf5fd80081a7d2bc54b86079a5642dd2ba.zip This comment is automatic and is meant to allow guests to get latest nightly builds without registering. It is updated on every successful build.
I tested these new tags in a PassengerDeletion's unit I created for the initial implementation of this logic:
PassengerDeletion.DisplaySoylent= -> works as expected PassengerDeletion.DisplaySoylentOffset= -> using the default 0,0 as the center unit coordinates: positive X values draws to the right and in the left if negative values are used. Positive Y values draws to lower coordinates and negative values go up. PassengerDeletion.UseCostAsRate= -> Works as expected PassengerDeletion.CostMultiplier= -> Works as expected, it tested instant deletions with 0.01 and eternal deletions like 100.0, also tested the default 100% (1.0) and the 50% equivalent (0.5) PassengerDeletion.DisplaySoylentToHouses= -> I tested this in Online multiplayer and 2 VM computers and it seems that it works as expected. I tested the next values: (default value) All, none, owner, allies, enemies
I suggest a new tag for multiplying the Soylent value (this "grinder" unit could be more efficient or worse than a Yuri Grinder structure). a tag like PassengerDeletion.SoylentMultiplier or similar name.
Fixed the issues and added PassengerDeletion.SoylentMultiplier.
I went ahead and tested this logic. Works for the most part for me, though there were parts I could not get to work and am not sure why. PassengerDeletion.ReportSound works as intended. PassengerDeletion.Anim works as intended. PassengerDeletion.Rate works as intended. PassengerDeletion.Soylent, PassengerDeletion.SoylentMultiplier, PassengerDeletion.SoylentFriendlies, PassengerDeletion.DisplaySoylent all work as intended. PassengerDeletion.Rate.SizeMultiply works as intended. PassengerDeletion.DisplaySoylentOffset works as intended. PassengerDeletion.UseCostAsRate does not work. PassegnerDeletion.CostMultiplier does not work. PassengerDeletion.DisplaySoylenyToHouses works as intended.
PassengerDeletion.UseCostAsRate I set to true and PassengerDeletion.UseCostAsRate I set to 100.0 and set to the Allied Landing Craft. I used the Battlefortress, Grizzly Tanks, and GIs as deletion subjects. Mainly the latter two, and found they just about always at the same time no matter what numbers I put in. Not sure If I did something wrong.
Can you please cherry pick the fixes from new feature additions into a new PR so we include it into 0.3?
PassengerDeletion.UseCostAsRate I set to true and PassengerDeletion.UseCostAsRate I set to 100.0 and set to the Allied Landing Craft. I used the Battlefortress, Grizzly Tanks, and GIs as deletion subjects. Mainly the latter two, and found they just about always at the same time no matter what numbers I put in. Not sure If I did something wrong.
Are you sure you did not disregard this bit from the documentation when it comes to PassengerDeletion.UseCostAsRate?
If PassengerDeletion.Rate is also set to a value higher than 0, it serves as a maximum cap for the time interval.
Been a long since I tried it out initially that I don't remember. I will test it again tomorrow.
You are correct it was an error on my part. I had PassengerDeletion.Rate=50 and PassengerDeletion.CostMultiplier=100.0. Will test again when able.
I tested it out again and nothing worked still. Here is how the code looks. Did I mess up on anything? PassengerDeletion.Rate=200 ; integer, game frames PassengerDeletion.Rate.SizeMultiply=false ; boolean PassengerDeletion.UseCostAsRate=true ; boolean PassengerDeletion.CostMultiplier=2.0 ; float, percents or absolute PassengerDeletion.Soylent=true ; boolean PassengerDeletion.SoylentMultiplier=10.0 ; float, percents or absolute PassengerDeletion.SoylentFriendlies=true ; boolean PassengerDeletion.DisplaySoylent=true ; boolean PassengerDeletion.DisplaySoylentToHouses=All ; Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all) PassengerDeletion.DisplaySoylentOffset=100,10 ; X,Y, pixels relative to default PassengerDeletion.ReportSound=GIAttack ; sound PassengerDeletion.Anim=UCFLASH ; animation
I tested it out again and nothing worked still. Here is how the code looks. Did I mess up on anything?
Try with PassengerDeletion.Rate=0 or leave omitted, or a much higher value than 200. In this case the duration of the deletion is capped to 200 frames regardless of cost, so anything that costs more than 100 credits (accounting for the multiplier) gets deleted in same time as $100 items.
Perhaps decoupling the cap from the Rate is a good idea since it seems like a potential source of confusion.
I already tried setting PassengerDeletion.Rate to 0. But all that did was shut off the whole unit deletion thing. Okay I got it to work. I set the PassengerDeletionRate to 20000 and then started seeing differences in time for units to get deleted. Well seems like it is good to go to me. Thanks for your help!
Fixed a bug that caused PassengerDeletion.UseCostAsRate to not work if PassengerDeletion.Rate was 0 or below and added separate PassengerDeletion.CostRateCap instead of reusing PassengerDeletion.Rate to prevent potential confusion.
Can you please cherry pick the fixes from new feature additions into a new PR so we include it into 0.3?
Still waiting on response on that one.
Can you please cherry pick the fixes from new feature additions into a new PR so we include it into 0.3?
Still waiting on response on that one.
I can but given that there's more fixes than new features, which mind you have been more or less tested at this point, I do wonder if there's any point. But yeah sure I can do that if that's how we're gonna roll.
Applied changes based on feedback, as well as the following:
- Set passenger deletion timer based on first passenger entered (the passenger to be deleted) rather than last
- Add
PassengerDeletion.(Soylent)AllowedHousesto control which houses passengers can belong to be eligible for deletion and/or refunding.PassengerDeletion.SoylentFriendlieshas been deprecated as a result.
- Add
PassengerDeletion.DontScoreto control whether or not deleted passengers are counted as killed by the transport.
Almost a year. Are you still planning to do any further modifications?
Nah