Map Editor questions

Started by florrat, August 21, 2011, 06:48:18 PM

Previous topic - Next topic

florrat

Let's post all questions you have about the map editor in this topic.

Let me start, I have some questions about pin fields.

1) Is the following true: If I have a level 1 pin field in a certain subcell, then it makes 5000 creeper in that subcell immovable, and the rest of the creeper moves normally? (if it's not true, then what does it then?)

2) What does "drip mode" do? I see some differences when I check that box, and I think it does the following. When the fields starts moving with x creeper in it, the amount of creeper it carries never exceeds x (even if it moves through denser creeper) (it can become smaller when crossing fields or ground). Is this true?

EDIT: I removed my third questions, since that was a suggestion
EDIT 2: I now see that the answer to question 1 is "no". But I'm curious to hear how they work exactly...

Ebon Heart

Any level pin field will hold any amount of creeper, though 
It's level will determine how much creepe it's able to take with it when it moves. If set to drip mode, theoretically, it should only take up to that max, drip mode makes it so that a field won't pick up extra creeper while moving.
When the going gets tough, the tough get going. The smart left a long time ago.
Check out the amazing A Tragedy Forgotten CW2 map series!

knucracker

Stationary pin fields of any strength will prevent the flow of creeper.  Creeper can flow in, but not out.  You can create a box of level 1 pin fields and then paint creeper in the middle to see this effect.  When a pin field moves, the strength of the pin field determines how much creeper will be taken with it.
Level 1 = 5000
Level 2 = 50000
Level 3 = 500000
Level 4 = 5000000

If a pin field has more creeper inside it than it can move, the excess will get left behind when it moves.

Ebon Heart

so... I'm confused about drip mode now, didn't drip mode used to control whether or not the pin field had a maximum?
When the going gets tough, the tough get going. The smart left a long time ago.
Check out the amazing A Tragedy Forgotten CW2 map series!

knucracker

#4
Drip mode only applies to moving pin fields.  Drip mode will record the amount of Creeper in the field at the start of a move action.  It will never pick up more than this amount along the way.  

Ebon Heart

alright, good, that's what I thought. :P That's what I had it as in my guide.
When the going gets tough, the tough get going. The smart left a long time ago.
Check out the amazing A Tragedy Forgotten CW2 map series!

Ranakastrasz

#6
Quote from: virgilw on August 22, 2011, 04:51:30 PM
Drip mode only applies to moving pin fields.  Drive mode will record the amount of Creeper in the field at the start of a move action.  It will never pick up more than this amount along the way.  

Is drive mode a typo?
I cannot seem to find any way to get this to work, at least in the editor, it may function right in game, I don't know.

knucracker

Yeah, that was a typo.  I just corrected it.  The game and the editor share the same field logic, so the behavior should be the same.

Looking at the code, it appears that I only 'record' creeper levels on the very first action... which must be a move action.  So it appears that I really did add this specifically to handle the case of simple "dripping".

Ranakastrasz

Quote from: virgilw on August 23, 2011, 12:10:54 PM
Yeah, that was a typo.  I just corrected it.  The game and the editor share the same field logic, so the behavior should be the same.

Looking at the code, it appears that I only 'record' creeper levels on the very first action... which must be a move action.  So it appears that I really did add this specifically to handle the case of simple "dripping".

Oh, Interesting. Does it reset it's count each time it loops, and keep it for the rest of the time after the initial move action? Because otherwise, I cannot figure out why this is not working.

knucracker

Yep... that appears to be the way I have it coded.  Record level only on the first action, and re-record them each loop.

Ranakastrasz

Ok, I am having trouble with it then, because It seems to pick up new creeper in the middle if it did not manage to pick anything up to start with. Does it save the amount on each pin tile, or over the whole field?

knucracker

Yeah.....
Looks like there is a bug where the editor remembers that it has recorded the drip limits... and this doesn't get reset when you click the reset button.  So, it takes a snapshot of the drip limits and it will keep them causing all kinds of confusion.  The only way they get reset in the editor is if you let it complete the last action in the list, but don't start the first action again.  This is hard to do...

This may be what is causing the confusion.  What is worse, the map editor also saves that it has recorded drip limits in the .cw2 file.  So just reloading won't correct the problem.  It will take a map editor patch to fix this.

Ebon Heart

Hmmm... For now though, I'll bet this can be used to create a wall. Lmao.
When the going gets tough, the tough get going. The smart left a long time ago.
Check out the amazing A Tragedy Forgotten CW2 map series!

knucracker

It gets even better....
It appears that a "0" limit is ignored (on purpose).  So if you are testing with a field and it doesn't pick anything up to start with, that won't count as a limit of "0". The field has to pick something up on the first action for a limit to get set.  With my new fix for actually resetting the limits, I just tested by having a pin field pick up 10 creeper and then move through a box of 50000.  It passed through and left the 50000 alone.

Here's the exact line I put when dragging creeper to a new subcell at i,j.
creeperData[i + j*width] = creeper > limit && limit > 0 ? limit : creeper;

garry131

My map editor question is:
If I want to use 6 of the original characters, and add 2 new characters.

I make my characters each 96 x 96, and have all characters in a row, 768 x 96.

So what is a easy way to get the pngs of the original characters?