Finite energy map.

Started by GoodMorning, June 05, 2016, 05:53:40 AM

Previous topic - Next topic

GoodMorning

Hello again,

I was wondering if there's a non-(CRPLed Guppy) way to produce a finite energy source? I was thinking of a map similar to the recent "walking dead" one, but making ll resources, including energy, finite. Thus the player must grab the loot lying around. Possibly this will take a while to extract, as well. I wanted to avoid Guppies, as the base will be vulnerable, and they auto-return to it, but I can't figure out a way to stop CNs from making power, or to stop Guppies trying to fly away if, say, you run out of AC (which would not be a losing condition, just a handicap until you found some more Ore). I also recall it being impossible to make proper packet dispatchers purely with CRPL.

Any ideas? Or will I just have to put up with Guppies?
A narrative is a lightly-marked path to another reality.

J

Guppies and CNs are the only things that can dispatch energy packets. So other creating your own energy infrastructure, guppies are your only option.

Builder17

Could you explain it more clearly , I didn't get your idea.  :(

mthw2vc

#3
An alternative might be a CRPL'd structure eating exactly a CN's natural supply rate, with a loss condition if it runs out of energy.


$MAX_ENERGY:10.0
$CONSUMPTION_PER_FRAME:0.05

once
  self CONST_MAXAMMO <-MAX_ENERGY setUnitAttribute
  self CONST_AMMO    <-MAX_ENERGY setUnitAttribute
  self CONST_CONNECTABLE    true setUnitAttribute
  self CONST_CANREQUESTAMMO true setUnitAttribute
  self CONST_REQUESTPACKETS true setUnitAttribute
  self CONST_PACKETREQUESTDELAY 1 setUnitAttribute
  self CONST_COUNTSFORVICTORY false setUnitAttribute
  self CONST_NULLIFIERDAMAGES false setUnitAttribute
endonce

self CONST_AMMO self CONST_AMMO getUnitAttribute
dup <-CONSUMPTION_PER_FRAME lt if
  failMission
  endif
<-CONSUMPTION_PER_FRAME sub setUnitAttribute


That should do the trick for one CN.

EDIT: I guess practically, the structure should also be indestructable and irrelevant to victory. Don't be too surprised if there are other details that hinder your application that I'm too lazy to think of right now! :)

Builder17

I got new map idea from your script.  :o

mthw2vc

In case anyone wonders, I adapted this idea from the (seriously cool) CW1 map Temple of Moloch. Also, I slightly modified the above script and added a disclaimer right after you posted, just so you know.

Sorrontis

Can I take it too? It's noice!
"If you want others to be happy, practice compassion. If you want to be happy, practice compassion."

mthw2vc

Use it how you like, but please give credit where credit is due.

Sorrontis

Quote from: mthw2vc on June 05, 2016, 12:54:36 PM
Use it how you like, but please give credit where credit is due.

Always! You're handle is "mthw2vc" ?
"If you want others to be happy, practice compassion. If you want to be happy, practice compassion."

GoodMorning

Slight issue: the CN tries to distribute packets evenly. Therefore, having two units, only one of which is allowed to run out of power, means either micromanagement or never getting a deficit.

I think I'll have to use the "GUPPYAIR" and protect the base. The idea is that all, or almost all, resources are scattered in deposits around the map, and must be extracted. So, you will have chronic energy problems, and using a CN will result in a constant deficit.

Therefore, using something like the "nuclear core" in Kalek's" The 8th Passenger" will result in certain doom.

Builder17: Imagine that all resources, even packets, are finite. You are given a small number of units, and must work your way around the map, gathering resources and battling Creeper and CRPL. Possibly a "Fog of war" could also turn up. Perhaps a few production facilities might appear, but these will be few and far between, and require you to go back to collect the resources. Perhaps you are trying to salvage components for a ship to get you out of there. In any case, every packet counts, and there are only so many, so you can't just leave a PC or Mortar to "hold the fort" indefinitely. I don't think I will allow units to be built either, you must find what you will use.
A narrative is a lightly-marked path to another reality.

mthw2vc

Quote from: GoodMorning on June 05, 2016, 09:50:04 PM
Slight issue: the CN tries to distribute packets evenly. Therefore, having two units, only one of which is allowed to run out of power, means either micromanagement or never getting a deficit.
I assumed for a finite energy map, something to the effect of all energy resources on the map being obtained via siphons, and running a deficit in that case is pretty much equivalent to running out of (non-replenishable) reserve energy. While winning with no energy left isn't necessarily completely impossible, I don't think it's worth worrying about from the perspective of creating a finite-energy map. You can also raise the MAX_ENERGY parameter if you want to allow somewhat greater leeway for this kind of thing.

I tried writing up another script to directly subtract energy from the CN reserves, which would be a little cleaner from that perspective, but it looks like CONST_AMMO is read-only for command nodes.