PDA

View Full Version : help with wkIndiMask


b1llygo4t
25 Jan 2012, 06:16
after i add the entry color for R:240, G:024, B:204 to the palette and add the color to the map i get an error loading file message when i try to play on it. i stripped all other wkmodules from my install. i also tried editing the map through the MapGen program and i get the same results. what am i doing wrong?

StepS
25 Jan 2012, 06:21
is the map properly indexed?

Plutonic
25 Jan 2012, 20:23
Could you post the map?
Also, do other indimask maps load ok?

b1llygo4t
29 Jan 2012, 04:24
thanks ill check it out when im near my worms comp

b1llygo4t
30 Jan 2012, 06:27
ok i got some existing maps working.

i was disappointed to find wkindimask isn't compatible with wkproject x. is there anyway to fix this? i really wanted to make a capture the flag map with wkindimask. really badly... =[

StepS
30 Jan 2012, 08:59
ok i got some existing maps working.

i was disappointed to find wkindimask isn't compatible with wkproject x. is there anyway to fix this? i really wanted to make a capture the flag map with wkindimask. really badly... =[

what happens? The indy mask destroys too? Then it can be because project x overrides indiness, and virtually all maps are destructible (but they have indestructible parts if a setting is enabled). I can make a script for your map to have indy pixels.

b1llygo4t
30 Jan 2012, 17:19
what happens? The indy mask destroys too? Then it can be because project x overrides indiness, and virtually all maps are destructible (but they have indestructible parts if a setting is enabled). I can make a script for your map to have indy pixels.

that would be awesome steps. would this script enable wkindimask or replace wkindimask? native px indimask would be nice since it's .libs can be distributed before a game starts. if this is the case the px script should use the same methods as wkindimask so maps will work with either wkindimask or px indimask.

DarkLord22
31 Jan 2012, 20:04
native px indimask would be nice since it's .libs can be distributed before a game starts. if this is the case the px script should use the same methods as wkindimask so maps will work with either wkindimask or px indimask.
It would probably override wkindimask, which would be sensible because, like you said, then all other players can just download the lib and won't need the extra dll.

But it can't work the same way if you have a 32bit map, there is no index table to check for #F018CC. I think the best thing would be to have an object you could add from the map editor to select what parts of the map are destructible. It would have a selectable "terrainType" property for Destructible, Indestructible or Tough.* This would also eliminate the need to screw around with colours (red, green, even, odd, etc.). Just place and go. :)


*Edit: Actually, you could make it even more flexible and just have an integer "toughness value". I don't know how difficult that would be to code though.

Plutonic
1 Feb 2012, 20:26
Indimask works by overriding all the functions that write to either the collision mask or the colour map array, and check the value of the pixel before removing it.

If projextx is overriding the same functions it would cause issues, but as they have converted it to 32bpp that in itself may be enough to break it, depending on how the 32bbp stuff was implemented.

That said, I see no reason that if an indi mode was to be added to projectx that it couldn't work using the same map format. It must already be doing some conversion from pallettised maps, the palette could be searched during this conversion. As for the overridden functions themselves they just need to be tweaked to make the same colour checks as indimask.

DarkLord22
1 Feb 2012, 20:52
I see no reason that if an indi mode was to be added to projectx that it couldn't work using the same map format. It must already be doing some conversion from pallettised maps, the palette could be searched during this conversion.
That could work as a "backwards compatibility" thing so that maps made for the original wkindimask would work without modifications. But if you have a 32bit map, there is no palette...So what are you searching?

b1llygo4t
2 Feb 2012, 10:49
i would rather use the color data to make in/destructible pixels in my preferred image editing software than the px map editor. you can't zoom in the px map editor and i don't see an indestructible land tool being very precise. could do without the pink color though, just place an object on the map in the pxeditor to activate it.

most of the work seems done, someone just needs to migrate the wkIndimask methods into a px script. which is beyond me, unfortunately.

this would be such a popular script...

Plutonic
5 Feb 2012, 19:08
If I had the time or energy I might look into doing it, but I haven't even bothered to install PX yet, let alone look into how to write scripts for it.

As for what you would search for if you don't have a pallette? You search the map. Pixel by pixel. Not the fastest operation on large maps granted, but any map that has had the pink pixel added by mapGen has it in a known location (bottom row, middle pixel), and I recon most people who do it manually will put it under the water, so as long as you start searching at the bottom first it shouldn't be too bad.

extremo
13 May 2012, 15:54
Heya,

is there any news on this feature? Would be really great if you could set indestructable areas with PX. Tried to look through different libs to get an idea how it could work but im a total px scripting noob till now :/

Greetings
Extremo