RedMew
RedMew copied to clipboard
Added adjustable Respawn Time to CrashSite (#957)
"Respawn timer shouldn't be as long or maybe timer starts off ~small and increases~ per death or maybe based off evolution"
- Implementation is based off evolution
- I chose to not cache global.config
Based on conversation with GrilledHam:
- Respawn delay is to prevent / punish early game suicide runs to clear nests.
This implementation decreases the respawn time from default of 60 seconds to a minimum of 10 seconds, by 5 seconds per 10% of evolution.
Added enable (default false) to control adjustable respawn delay. When disabled, respawn is 60 seconds.
I personally don't think it makes sense to reduce the respawn time based on evolution. Evolution is used to make the game harder and here we are using it to arguably make the game easier. Personally I think that confuses the purpose of evolution.
Gameplay-wise I feel the current value of 1 min does become too much sometimes as you need to almost always travel far to recover the body but it's worth the wait and it forces the person to be careful. I would prefer providing minutes to players so they can choose to use those minutes to reduce their respawn times. Keep a floor respawn time of 10s. Minutes could be earned by staying online and of course, in the future, we could provide unlimited minutes to the contributors.
I think adding an upgrade to the spawn market that reduces spawn time for the whole team would be my preferred way to more forward with this.
I'm open to more discussion / ideas though.
I'm good with making it a purchase. The bonus for me is that I would learn how to add an item to the market, which I want to learn as part of #977 .
What numbers are you thinking would be good? We need:
- Initial Price (coins)
- Increase in price per purchase (coins)
- Max level (market level)
- Change per purchase (seconds)
I'm thinking we keep these values
- Minimum time (currently 10 seconds)
- Initial [maximum) time (currently 60 seconds)
- Enable / Disable
Which of the above values would be stored in the Root Config File? Is there a Market Configuration File? (I haven't looked.)
One of the earlier comments was a penalty for quick deaths. (e.g. If last respawn was less than X minutes ago, respawn_delay is max_respawn_delay.) I'd like to add this, but I'd need to know if the Factorio or RedMew code keeps track of time since last spawn for players. I wouldn't want to add a table to track that for just this rarely-used feature.
thanks
You can fetch the market group a market belongs to and then use Retailer.set_item
to add it. To update the price you can either completely replace the item, or look it up with Retailer.get_items
and change the price. Note that the latter doesn't trigger a GUI refresh, so you're safer replacing the item (use a copy, not a reference to the same table).
Edit Additionally you can also make it purchasable once, and add an event listener to add the new one. You can also add all of the upgrades from the start and only enable them when the previous is bought.
@HySpeed are you still working on this? It looks like a really good feature but has been quiet for a while.
@HySpeed are you still working on this? It looks like a really good feature but has been quiet for a while.
@Jayefuu I did not work on it any farther. It was a bit too high of a technical hurdle for me to figure out. Anyone else is welcome to continue and implement it.