Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Thu Dec 26, 2024 7:56 pm
All times are UTC + 0
SHP
Moderators: stucuk
Post new topic   Reply to topic Page 3 of 3 [149 Posts] Mark the topic unread ::  View previous topic :: View next topic
Goto page: Previous 1, 2, 3
Author Message
stucuk
Geek


Joined: 27 Aug 2002

PostPosted: Fri Aug 26, 2016 1:24 pm    Post subject: Reply with quote  Mark this post and the followings unread

Does anyone know what palette is used for TS's SideNC01.mix's SHP's? Can't find any palette that makes them show right.

tomsons26lv wrote:
What are you talking about.. See the ts shp header i posted in the same post where the Icon(tmp) header is.

Oh you mean the unknown bit before offset in a frames's header (Not the SHP Header). I thought you meant the first two bytes of the SHP Header which people call Zero (Since its always a Zero).

Crimsonum wrote:
I noticed a small error, though: The last colour in the palette (#255) is actually affected by the ambient lighting. So only colours from #240 to #254 should not be affected by the luminosity change.

Fixed.

E1 Elite wrote:
If that same logic is available for isotem.pal
or non unit*.pal custom palettes, it would give incorrect info.

The only issue with limiting it to a palette with a specific name is if someone used a custom palette with a different name.

E1 Elite wrote:
If you are looking for more viewing features, some ideas:
- tool could provide a mask on the palette to show which colors are used or not used for
current frame or in the first half of the frames or the whole of the SHP.
- or a selectable palette where user can click on colors to be pinked out to see if the image
is affected.
- animation could have a loop from-to frame numbers to view only a subset of frames looped
- tool could show the compression used alongside the frame counter.
- could allow the background scene to come from an image. It might help in screenshot or
even cameo making.

Im always looking for ideas for features, especially ones people will use (I know from experience i could think something is a good idea for a feature but in reality never gets used). Your ideas are good though what would be the use in knowing what the compression used for each frame is?

E1 Elite wrote:
Hope your palette dropdown extends for longer filenames like unttemmask1ra2bgremap.pal.

After finding a hack for the combobox's to make it auto size it now does #Tongue.

Lin Kuei Ominae wrote:
As for the custom background image suggestion, it would be very useful if you could load multiple SHPs for one preview. So you don't have to go ingame to check how it turns out.
Just load the background image (screenshot of a ingame landscape), load the SHPs, set the loop frames for each SHP and click play for a nice preview.

So a list of all SHP's say at the left (Where you select one), click on the middle bit to place a SHP and have the ability to set the frames it plays? May be best as a separate application, unless its meant to be displaying the SHP you have already opened (And say edited) and your just comparing it to other SHP's.

Lin Kuei Ominae wrote:
Then a working gif exporter would be great (not this color ruining thing in SHP builder)

Afaik GIF's use a 256 colour palette so there shouldn't be an issue with colours (Just copy the palette over and then the pixels). Importing should be the only place colours can go wrong.

_________________
Free Map Editor - Game Requirements - Stucuk.Net

Back to top
View user's profile Send private message Visit poster's website
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Fri Aug 26, 2016 1:49 pm    Post subject: Reply with quote  Mark this post and the followings unread

stucuk wrote:
though what would be the use in knowing what the compression used for each frame is?

for comparison and verification this could be indeed useful.
So far you can only change the compression in SHP Builder and then test ingame if anything has changed, but it's still only a blind test. Because if nothing has changed ingame you wouldn't know if SHP Builder made a mistake when saving the SHP, or you when implementing it in the mix etc.

Thus a way to actually see/proof the used compression would be useful.

Then you could also proof that a certain compression leads to certain artifacts and render layer issues.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Fri Aug 26, 2016 2:04 pm    Post subject: Reply with quote  Mark this post and the followings unread

It is because the game behaves differently with different compression specially when it has to
render one SHP over another. And I don't have to go and open the file in a hex editor to check
for its compression bits. SHP Builder shows in preview but only for normal frames, not for
shadow frames.

Actually I would have liked 2 more save options, irrespective of which saves the best. One with
all frames compressed with 3 and 2nd option with normal frames in compression 3 and shadow
frames with 1 only. Just for testing different cases.

Back to top
View user's profile Send private message
stucuk
Geek


Joined: 27 Aug 2002

PostPosted: Fri Aug 26, 2016 3:36 pm    Post subject: Reply with quote  Mark this post and the followings unread

E1 Elite wrote:
It is because the game behaves differently with different compression specially when it has to
render one SHP over another.

That sounds like odd behaviour. I wouldn't have thought compression would have any effect. Have you tried the "Flag" as different values to see if it had an effect (like the first bit flag).

E1 Elite wrote:
SHP Builder shows in preview but only for normal frames, not for
shadow frames.

My understanding is that shadow frames should be saved without compression.

E1 Elite wrote:
Actually I would have liked 2 more save options, irrespective of which saves the best. One with
all frames compressed with 3 and 2nd option with normal frames in compression 3 and shadow
frames with 1 only. Just for testing different cases.

At some stage i plan on either making a custom save dialog or expanding the windows one (Latter being an annoying way.. Windows API stuff is always annoying).

_________________
Free Map Editor - Game Requirements - Stucuk.Net

Back to top
View user's profile Send private message Visit poster's website
tomsons26lv
Cyborg Artillery


Joined: 30 Dec 2009
Location: Latvia

PostPosted: Fri Aug 26, 2016 4:09 pm    Post subject: Reply with quote  Mark this post and the followings unread

stucuk wrote:
Does anyone know what palette is used for TS's SideNC01.mix's SHP's? Can't find any palette that makes them show right.

Oh you mean the unknown bit before offset in a frames's header (Not the SHP Header). I thought you meant the first two bytes of the SHP Header which people call Zero (Since its always a Zero).

If there's no PAL anywhere then the game loads it from a PCX.
Seeing the content in that mix mpscore.pcx is likely it.

No, it's commonly called A, and that's what i would have referred it to should i mention it.
As for what it is its definatly a word not two bytes, its 00s in the shps i've seen, but that doesn't mean it can't have anything else, so far i've only found that the game checks if its -1 and if so doesn't render the shp(does load it tho) and that its somehow related to how the shp is loaded and buffered.
As for Zero thats still my running theory that it could be a checksum of a linked file.

_________________
Tiberian Dawn, Red Alert, Tiberian Sun ,Red Alert 2,Renegade, Command & Conquer 3,Tiberium and Tiberium Wars and Westwood related image & video archive
https://picasaweb.google.com/113361105083292812413?noredirect=1

Skype live:tomsons26
Don't forget to state who are you otherwise i'll ignore the invite

Back to top
View user's profile Send private message Visit poster's website
tomsons26lv
Cyborg Artillery


Joined: 30 Dec 2009
Location: Latvia

PostPosted: Fri Aug 26, 2016 4:25 pm    Post subject: Reply with quote  Mark this post and the followings unread

stucuk wrote:
E1 Elite wrote:
SHP Builder shows in preview but only for normal frames, not for
shadow frames.

My understanding is that shadow frames should be saved without compression.

E1 Elite wrote:
Actually I would have liked 2 more save options, irrespective of which saves the best. One with
all frames compressed with 3 and 2nd option with normal frames in compression 3 and shadow
frames with 1 only. Just for testing different cases.

At some stage i plan on either making a custom save dialog or expanding the windows one (Latter being an annoying way.. Windows API stuff is always annoying).


#Mad
Stop calling them compressions, there's only ONE, RLE. The first word? of Flags (newest guess on what is it, might as well be a dword bitfield) is a bitfield for the Blitter

bool Nothing; // 0 Nothing is on
bool Unknown1; // 1
bool RLECompressed; // 2
bool Unknown2; // 4
bool Unknown3; // 8
bool Unknown4; // 16
bool Unknown5; // 32
bool Unknown6; // 64
bool Unknown7; // 128
///A byte bitfield would end here///
bool Unknown8; // 256
bool Unknown9; // 512
bool Unknown10; // 1024
etc ....

Each bit activates some option
Let's take some of the known Flags from the original games shps and explain them

4D000000
9B000000
63000000

4D=77 in decimal and means option 1, 4, 8 and 64 is active
9B=155 in decimal and means option 1, 2, 8, 16 and 128 is active
63=99 in decimal and means option 1, 2, 32 and 64 is active

stucuk wrote:
E1 Elite wrote:
It is because the game behaves differently with different compression specially when it has to
render one SHP over another.

That sounds like odd behaviour. I wouldn't have thought compression would have any effect. Have you tried the "Flag" as different values to see if it had an effect (like the first bit flag).

That's perfectly correct behavior given what the word is for and how the Blittters work.
When RLECompressed is on the game uses one of the many RLE blitters as those decompress RLE right before blitting the image to the screen if its off it uses BlitPlain blitters, it's really possible that one of them has a bug somewhere that affects how the shp is drawn(besides the bitfield values that affect it directly and as intended).

_________________
Tiberian Dawn, Red Alert, Tiberian Sun ,Red Alert 2,Renegade, Command & Conquer 3,Tiberium and Tiberium Wars and Westwood related image & video archive
https://picasaweb.google.com/113361105083292812413?noredirect=1

Skype live:tomsons26
Don't forget to state who are you otherwise i'll ignore the invite

Back to top
View user's profile Send private message Visit poster's website
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Fri Aug 26, 2016 5:18 pm    Post subject: Reply with quote  Mark this post and the followings unread

tomsons26lv wrote:
#Mad
Stop calling them compressions, there's only ONE, RLE.

bad habit of not knowing it any better for the past 16 years Wink

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
stucuk
Geek


Joined: 27 Aug 2002

PostPosted: Fri Aug 26, 2016 11:44 pm    Post subject: Reply with quote  Mark this post and the followings unread

tomsons26lv wrote:
No, it's commonly called A,

XCC refers to it as Zero. A is an odd name especially as its always Zero.

tomsons26lv wrote:
As for what it is its definatly a word not two bytes

A word is two bytes long. An unsigned 16bit number. Signed or not doesn't matter when your checking to see if a value is not 0 as 0 is the same with both signed and unsigned.

tomsons26lv wrote:
newest guess on what is it, might as well be a dword bitfield

Has anyone tried to strip the SHP's which use the full 4 bytes so that it only contains the compression flag to see if there is any difference in game? Or to take the values from one SHP and shove them into another.

tomsons26lv wrote:
That's perfectly correct behavior given what the word is for and how the Blittters work.

I understand that each flag combination has different render paths. Original War which iv maintained since 2005(And the reason i stopped working on CNC tools) has GM files which are 3d Sprites (One image for pixels and one for Z buffer image). They use separate paths for the different types.

But its not correct behaviour to do things differently based on if something is compressed or not. How they should work is identical to each other if only compression is whats different.

Are you sure that its the compression being used or not which is what causes issues and not say Bit 1 of the flag being on/off?

Quote:
Stop calling them compressions, there's only ONE, RLE.

So do you think compression 1 is better than compression 2 or is compression 3 best?  Laughing

_________________
Free Map Editor - Game Requirements - Stucuk.Net

Back to top
View user's profile Send private message Visit poster's website
stucuk
Geek


Joined: 27 Aug 2002

PostPosted: Sat Aug 27, 2016 6:28 am    Post subject: Reply with quote  Mark this post and the followings unread



Does that look ok for save options? I'm now going with the assumption that flags is 2 bytes long (Word). Compression options control if flag 2 is used (Which is why the HEX bit states 2 possibilities in the screenshot).

-----------

Attached is a new SHP Debug file. Flags is now a Word so its displayed differently and the old "Align" is now a Word too. The "Zero" bit before offset is included at the end (Which from what i can see is always Zero).

The following is now the layout of the header i am using:
Code:
TSHP_Header_Image = record
  X, Y, W, H  : Word;
  Flags       : Word;
  Unknown     : Word; // Part of Flags? Something else?
  RadarColor  : TRGBTriple;
  Unknown1    : Byte; // Part of Radar Color? Seperate?
  Unknown2,           // ????
  Offset      : Cardinal;
 end;


Txt file's frame lines is:
FrameNumber - X - Y - Width x Height - Flags - Unknown - RadarColor(R,G,B) , Unknown1 - Unknown 2

Interestingly SideNC's have 0056(Bit 8, 16 and 32) for the Unknown after Flags (Though so does TS\isoTemp\ufo.tem).



SHPs_debug.txt
 Description:

Download
 Filename:  SHPs_debug.txt
 Filesize:  105.3 KB
 Downloaded:  33 Time(s)


_________________
Free Map Editor - Game Requirements - Stucuk.Net

Back to top
View user's profile Send private message Visit poster's website
E1 Elite
General


Joined: 28 May 2013

PostPosted: Sat Aug 27, 2016 7:18 am    Post subject: Reply with quote  Mark this post and the followings unread

Can you confirm:
Auto Compress Best Size - If some anim SHP does not have shadow frames, it will compress all with
comp 3 or none based on resulting size. Same as 50/50 if there are shadow frames?
Half 50/50 - Normal frames are either comp3 or no compression, shadow frames no compression
All Compressed - Normal frames in comp3, shadow none
No Compression - All frames no compression

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Sat Aug 27, 2016 7:25 am    Post subject: Reply with quote  Mark this post and the followings unread

Are all the flags used?
Maybe a few (e.g. the last 3) of them can be used to store some of your additional info in them.
With 3 flags you could store already 9 different values like TS/anim, RA2/anim, TS/unit, RA2/unit,  etc and thus load an appropriate palette.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
stucuk
Geek


Joined: 27 Aug 2002

PostPosted: Sat Aug 27, 2016 9:43 am    Post subject: Reply with quote  Mark this post and the followings unread



Some of the SideNC's work with mpscore's palette but others don't (Such as smlogo.shp).

E1 Elite wrote:
Can you confirm:
Auto Compress Best Size - If some anim SHP does not have shadow frames, it will compress all with
comp 3 or none based on resulting size. Same as 50/50 if there are shadow frames?
Half 50/50 - Normal frames are either comp3 or no compression, shadow frames no compression
All Compressed - Normal frames in comp3, shadow none
No Compression - All frames no compression

They do exactly what they say. Best is best, 50/50 is 50% compressed and 50% not compressed. All compressed uses compression for all. None is for none. There is no concept of shadow frames as there is no way for it to know what has shadow frames and what doesn't.

My understanding is that 50/50 should be what you want with SHP's that have shadow frames.

There is no Comp 3. For what was Comp 3 you would have to enable 1 in the Force Flags bit as compression is flag 2.

Lin Kuei Ominae wrote:
Are all the flags used?

Even if they are not used in the official SHP's they may be used by the game. Adding data to unknown flags/etc is far more risky than adding data to the end of the file (Since the latter isn't in use by the format).

_________________
Free Map Editor - Game Requirements - Stucuk.Net

Back to top
View user's profile Send private message Visit poster's website
CCHyper
Defense Minister


Joined: 07 Apr 2005

PostPosted: Sat Aug 27, 2016 11:18 am    Post subject: Reply with quote  Mark this post and the followings unread

Flags has only;
0 - None
1 = Unknown, as discussed above
2 = RLE Zero.

There is no others in that bitfield, and there is no other bitfields in the Header.

"RadarColor" is actually a common/average colour, "What would this shape look like if it was resized to 1x1 pixels?". When asking Joe Bostic about the format, he said this was added for a general purpose, but of course used afterwards in the radar code for plotting the radar pixel.

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Sat Aug 27, 2016 12:52 pm    Post subject: Reply with quote  Mark this post and the followings unread

How about alienating the radar colors for your additional data stucuk?
Unit, building and animation SHPs, they all don't use the radar color.
Only Overlays like Tiberium and maybe also TerrainTypes (not sure) use it.

So you can code something simple like
if (RadarColor.AsHexValue.StartsWith(0x0123))
{
//you identified the radar colors as a special case used by your program (first 2 byte are 01 and 23 as hex value)
//use the 3rd byte to store any data you want
}
else
{
//the radar was set on purpose with a certain color, so don't try to guess the SHP type
}

for the 90% units,buildings and animations SHPs out there, your program should this way store the additional type data fine in the file, without messing up any engine or decoder that reads them.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Sat Aug 27, 2016 1:05 pm    Post subject: Reply with quote  Mark this post and the followings unread

Open smlogo.shp with sidecd01.mix -> mapsel.pal

Back to top
View user's profile Send private message
stucuk
Geek


Joined: 27 Aug 2002

PostPosted: Sat Aug 27, 2016 1:58 pm    Post subject: Reply with quote  Mark this post and the followings unread

CCHyper wrote:
Flags has only;
0 - None
1 = Unknown, as discussed above
2 = RLE Zero.

There is no others in that bitfield, and there is no other bitfields in the Header.

RA2\ra2\Cache\infshdw.shp 9x5 Count: 2
Frame 0000:    0,   0    0x   0 0004 0000 000,000,000,000 0012FB00
Frame 0001:    0,   0    9x   5 0001 0000 000,000,000,000 00000000

RA2\ra2\IsoSnow\c_shadow.shp 180x150 Count: 28
Frame 0000:    0,   0    0x   0 CCCC CCCC 000,000,000,204 CCCCCCCC
Frame 0001:    0,   0    0x   0 CCCC CCCC 000,000,000,204 CCCCCCCC

Granted its a 0x0 frame, but one has a 4 and one CCCC. It also uses that unknown field (The one before the offset) thats normally all zeros.

The two bytes after "Flags" (Which iv named "Unknown") seem to either be 0000, 006C, CCCC, 0056 or 0059 (I am talking about frames with an actual size).

I am leaning towards flags being a dword.

CCHyper wrote:
"RadarColor" is actually a common/average colour, "What would this shape look like if it was resized to 1x1 pixels?". When asking Joe Bostic about the format, he said this was added for a general purpose, but of course used afterwards in the radar code for plotting the radar pixel.

But is it RGB or RGBA.

Lin Kuei Ominae wrote:
How about alienating the radar colors for your additional data stucuk?

No. I am not putting data inside existing header data. That would be abusing the format. Also its not an overall solution.

E1 Elite wrote:
Open smlogo.shp with sidecd01.mix -> mapsel.pal

Doh i thought i checked all palettes. Thx.

_________________
Free Map Editor - Game Requirements - Stucuk.Net

Back to top
View user's profile Send private message Visit poster's website
tomsons26lv
Cyborg Artillery


Joined: 30 Dec 2009
Location: Latvia

PostPosted: Sat Aug 27, 2016 2:37 pm    Post subject: Reply with quote  Mark this post and the followings unread

Me and Hyper are at a impasse, ShapeSet exe shows there's only 1 and 2, the games files consistently say otherwise.

Hyper is hell bent on believing ShapeSet, i think given the team that worked with that particular version of shapeset only worked on buildings and units this version was simplified to minimize confusion on what to use as seems the ideal is those two flags for the shps based on what WW's files have.

Meh, without the sources we probably will never find out what the other bits were/or are. Maybe though a long trail and error process...
I guess i give up

As for CommonColor, the forth byte might be a bitfield for how this color is treated or something, doesn't seem relevant to the C&C engine tho so i guess just ignore it.

Oh yea Flag 1 in TS and RA2 are two different things it would seem. If a shp is made with shapeset with the -x command line which sets this flag, it crashes in TS but renders fine in RA2 but that's only when the Wdith is set before the frames by ShapeSet. Dunno whats up with this system.

_________________
Tiberian Dawn, Red Alert, Tiberian Sun ,Red Alert 2,Renegade, Command & Conquer 3,Tiberium and Tiberium Wars and Westwood related image & video archive
https://picasaweb.google.com/113361105083292812413?noredirect=1

Skype live:tomsons26
Don't forget to state who are you otherwise i'll ignore the invite

Back to top
View user's profile Send private message Visit poster's website
Bittah Commander
Defense Minister


Joined: 21 May 2003
Location: The Netherlands

PostPosted: Sat Aug 27, 2016 3:53 pm    Post subject: Reply with quote  Mark this post and the followings unread

stucuk wrote:
But is it RGB or RGBA.

From what I can tell, it's just RGB. I just edited an overlay with a HEX editor and I replaced the first byte after the actual radar color (since this SHP was created with XCC Mixer, that means it's the first byte after every instance of 00 00 07). The original value was 00, so I replaced it with FF for all of them and then started the game with a map where I placed won lots of this overlay.

Before I applied the change with the HEX editor, I saw lots of black dots on the radar and after the change it was still exactly the same. To make sure that the byte I replaced was truly the one that came right after the radar color, I then also replaced every instance of 00 00 07 with FF 00 07 and checked the radar color ingame again, which then turned red as expected.
To make extra sure, I took a screenshot this time, then replaced the first byte after every instance of FF 00 07 with 7F and then took took another screenshot so that I could compare it with the first screenshot, but the radar color was still 100% identical.

So the 4th byte doesn't seem to do anything to the radar color at all.
It would've been useful if the radar color of certain overlays or terrain objects could be turned transparent or invisible, so that's too bad. The best alternative to that is for this tool to automatically use the average color of every frame, just like SHP Builder does nowadays.

_________________

Back to top
View user's profile Send private message ModDB Profile ID YouTube User URL Facebook Profile URL
stucuk
Geek


Joined: 27 Aug 2002

PostPosted: Sat Aug 27, 2016 4:18 pm    Post subject: Reply with quote  Mark this post and the followings unread

tomsons26lv wrote:
Me and Hyper are at a impasse, ShapeSet exe shows there's only 1 and 2, the games files consistently say otherwise.

Well it does seem like specific data but it may be ignored by the games. I havn't done any testing, only looked at the files.

tomsons26lv wrote:
Oh yea Flag 1 in TS and RA2 are two different things it would seem. If a shp is made with shapeset with the -x command line which sets this flag, it crashes in TS but renders fine in RA2 but that's only when the Wdith is set before the frames by ShapeSet. Dunno whats up with this system.

Flag 1 is valid for TS.

TS\Conquer\armor.shp 33x33 Count: 23
Frame 0000:   10,  17   12x  12 0001 0000 177,177,177,000 00000000 00000230
Frame 0001:    9,  13   15x  16 0001 0000 185,185,185,000 00000000 000002C0
Frame 0002:    7,   9   19x  19 0001 0000 188,188,188,000 00000000 000003B0
Frame 0003:    4,   4   24x  24 0003 0000 190,190,190,000 00000000 00000520
Frame 0004:    4,   4   24x  24 0003 0000 190,190,190,000 00000000 00000760
Frame 0005:    4,   3   25x  25 0003 0000 187,187,187,000 00000000 000009A0
Frame 0006:    4,   3   25x  25 0003 0000 185,185,185,000 00000000 00000BF8
Frame 0007:    4,   2   24x  28 0003 0000 179,179,179,000 00000000 00000E58
Frame 0008:    4,   1   24x  30 0003 0000 157,157,157,000 00000000 000010D0
Frame 0009:    4,   0   24x  32 0003 0000 135,135,135,000 00000000 00001350
Frame 0010:    4,   0   24x  32 0003 0000 119,119,119,000 00000000 000015E0
Frame 0011:    3,   0   25x  31 0003 0000 105,105,105,000 00000000 00001880
Frame 0012:    0,   0   30x  30 0003 0000 096,096,096,000 00000000 00001B40
Frame 0013:    0,   0   30x  30 0003 0000 092,092,092,000 00000000 00001E40
Frame 0014:    1,   0   30x  30 0003 0000 092,092,092,000 00000000 00002158
Frame 0015:    0,   0   32x  30 0003 0000 091,091,091,000 00000000 00002478
Frame 0016:    0,   0   32x  30 0003 0000 092,092,092,000 00000000 00002798
Frame 0017:    0,   0   32x  31 0003 0000 086,086,086,000 00000000 00002AB0
Frame 0018:    0,   0   32x  32 0003 0000 085,085,085,000 00000000 00002DA8
Frame 0019:    1,   0   31x  32 0003 0000 083,083,083,000 00000000 00003080
Frame 0020:    4,   6   25x  26 0003 0000 078,078,078,000 00000000 00003350
Frame 0021:    6,  11   20x  20 0003 0000 084,084,084,000 00000000 00003540
Frame 0022:    9,  16   15x  15 0001 0000 089,089,089,000 00000000 00003698

TS\Conquer\canister.shp 7x6 Count: 15
Frame 0000:    1,   0    4x   6 0000 0000 043,054,058,000 00000000 00000170
Frame 0001:    0,   0    6x   6 0001 0000 044,053,054,000 00000000 00000188
Frame 0002:    0,   0    6x   6 0001 0000 049,053,054,000 00000000 000001B0
Frame 0003:    0,   1    6x   4 0000 0000 043,055,057,000 00000000 000001D8
Frame 0004:    0,   0    6x   6 0001 0000 045,059,062,000 00000000 000001F0
Frame 0005:    0,   0    6x   6 0001 0000 057,072,076,000 00000000 00000218
Frame 0006:    1,   0    4x   6 0001 0000 072,088,090,000 00000000 00000240
Frame 0007:    1,   0    4x   6 0000 0000 078,101,106,000 00000000 00000258
Frame 0008:    0,   0    6x   6 0001 0000 065,080,085,000 00000000 00000270
Frame 0009:    0,   0    6x   6 0001 0000 050,062,063,000 00000000 00000298
Frame 0010:    0,   1    6x   4 0001 0000 041,049,052,000 00000000 000002C0
Frame 0011:    0,   1    6x   4 0001 0000 044,057,061,000 00000000 000002D8
Frame 0012:    0,   0    6x   6 0001 0000 050,065,070,000 00000000 000002F0
Frame 0013:    0,   0    6x   6 0001 0000 057,074,078,000 00000000 00000318
Frame 0014:    1,   0    4x   6 0001 0000 045,057,062,000 00000000 00000340

Etc. TS and RA2 both use 0, 1 and 3. RA2 has some 2's (Though just with the fence's afaik).

Flag 1 seems to indicate Zeros(Or Transparency). If you look at canister.shp for example it only has flag 1 when the frame has #0 in it. Fence's in RA2 don't have have flag 1 when there are no #0. So id go on a limb and state that flag one should only be set if there are #0's in the frame.

tomsons26lv wrote:
I guess i give up



Bittah Commander wrote:
From what I can tell, it's just RGB.

Thanks for testing. I will make it get the average colour unless people require it to also have manual selection.

_________________
Free Map Editor - Game Requirements - Stucuk.Net

Back to top
View user's profile Send private message Visit poster's website
tomsons26lv
Cyborg Artillery


Joined: 30 Dec 2009
Location: Latvia

PostPosted: Sun Aug 28, 2016 11:43 am    Post subject: Reply with quote  Mark this post and the followings unread

Hmm -x is something else, it seems to only add the extra Width to every frame start if the source image is larger than 300x300?(need to recheck at some point) and this is a feature introduced in RA2, with the extra Width specified it crashes the game in TS.


This just keeps getting weirder.
Tested out when ShapeSet sets 1
That one stray pixel makes all the difference
So it's if there's a zero anywhere in the art itself it gets set

Guess when flag 1 isn't set the only real purpose of this is to ease rendering of box shape objects such as UI elements where none transparent pixels exist but given the isometric nature of the games this is useless elsewhere as there will always be transparent pixels in the art

_________________
Tiberian Dawn, Red Alert, Tiberian Sun ,Red Alert 2,Renegade, Command & Conquer 3,Tiberium and Tiberium Wars and Westwood related image & video archive
https://picasaweb.google.com/113361105083292812413?noredirect=1

Skype live:tomsons26
Don't forget to state who are you otherwise i'll ignore the invite

Back to top
View user's profile Send private message Visit poster's website
stucuk
Geek


Joined: 27 Aug 2002

PostPosted: Sun Aug 28, 2016 12:20 pm    Post subject: Reply with quote  Mark this post and the followings unread

Whats the difference file wise? As in what is it actually setting in the SHP?

_________________
Free Map Editor - Game Requirements - Stucuk.Net

Back to top
View user's profile Send private message Visit poster's website
tomsons26lv
Cyborg Artillery


Joined: 30 Dec 2009
Location: Latvia

PostPosted: Sun Aug 28, 2016 12:33 pm    Post subject: Reply with quote  Mark this post and the followings unread

:\
That is it. With the first ShapeSet keeps flags as zeros, with second and third image it sets flags as 1

Heres another example
Flags will be 0 on


Flags will be 1 on

Guess what you can call it is DontIgnoreZeros or AccountForZeros or something like that.
Do note that the game won't render the entire thing however as
ShapeFrameHeader{
word OffsetX // <CCHyper> they are x and y pos

word OffsetY // <CCHyper> they define the left and top position of a rect for blitting
//These are offsets that determine where the rectangle that's formed from DrawnWidth and DrawnHeight is

word DrawnWidth //The Width of the actually drawn? or prioritized pixels from this frame, if 0 assumed all

word DrawnHeight //The Height of the actually drawn? or prioritized pixels from this frame, if 0 assumed all

Need to check but i think these are prioritized to be drawn pixel offsets but hope you get the idea.

If Flag 1 isn't set the game would skip?/lazily read?/partially read?/not prioritize rendering? all the data to the point where the rectangle that is formed from the width and height and positioned based on those offsets is specified.

To be completely clear

and yes 18x11 is the offset from top left where the rectangle starts

_________________
Tiberian Dawn, Red Alert, Tiberian Sun ,Red Alert 2,Renegade, Command & Conquer 3,Tiberium and Tiberium Wars and Westwood related image & video archive
https://picasaweb.google.com/113361105083292812413?noredirect=1

Skype live:tomsons26
Don't forget to state who are you otherwise i'll ignore the invite

Back to top
View user's profile Send private message Visit poster's website
tomsons26lv
Cyborg Artillery


Joined: 30 Dec 2009
Location: Latvia

PostPosted: Sun Aug 28, 2016 1:10 pm    Post subject: Reply with quote  Mark this post and the followings unread

Yes checks out
Conyard has a offset of 37x74 and DrawnW and H of 212x148, set Width to 112


Hmm with 1 set it crops anyway... Welp at least we now know that thats the actually drawn width and height

_________________
Tiberian Dawn, Red Alert, Tiberian Sun ,Red Alert 2,Renegade, Command & Conquer 3,Tiberium and Tiberium Wars and Westwood related image & video archive
https://picasaweb.google.com/113361105083292812413?noredirect=1

Skype live:tomsons26
Don't forget to state who are you otherwise i'll ignore the invite

Back to top
View user's profile Send private message Visit poster's website
stucuk
Geek


Joined: 27 Aug 2002

PostPosted: Sun Aug 28, 2016 1:12 pm    Post subject: Reply with quote  Mark this post and the followings unread

What? I mean the -x thing you are going on about which crashes the game.

_________________
Free Map Editor - Game Requirements - Stucuk.Net

Back to top
View user's profile Send private message Visit poster's website
tomsons26lv
Cyborg Artillery


Joined: 30 Dec 2009
Location: Latvia

PostPosted: Sun Aug 28, 2016 1:15 pm    Post subject: Reply with quote  Mark this post and the followings unread

Besides the Width in front of every frame dunno anything else.
Get ShapeSet from http://www.ppmforums.com/viewtopic.php?t=38429 and try testing yourself. Start with a 512x512 pcx to be sure and scale it down until it hits where the extra Width isn't set anymore.
Note for whatever fucked up reason the palette is read from the pcx upside down..

Edit:
Remembered i did find out one thing when testing if ANM conversion still works
Without -X command line


With it


So the current theory is they were debugging high res shp issues and the extra width is some forced alignment

Edit:
Tried again with the same EA Sporks anm file, its actually just adding extra 7 pixels to the Frame Width for it, with the pcx included in the pack it added the width as separate extra data...
What the inconsistent ztype is this

Last edited by tomsons26lv on Sun Aug 28, 2016 1:29 pm; edited 1 time in total

Back to top
View user's profile Send private message Visit poster's website
CCHyper
Defense Minister


Joined: 07 Apr 2005

PostPosted: Sun Aug 28, 2016 1:27 pm    Post subject: Reply with quote  Mark this post and the followings unread

stucuk wrote:
CCHyper wrote:
"RadarColor" is actually a common/average colour, "What would this shape look like if it was resized to 1x1 pixels?". When asking Joe Bostic about the format, he said this was added for a general purpose, but of course used afterwards in the radar code for plotting the radar pixel.

But is it RGB or RGBA.


I never implied it was not, I was just sharing the information given to me from the guy who wrote the format himself.

Back to top
View user's profile Send private message
stucuk
Geek


Joined: 27 Aug 2002

PostPosted: Sun Aug 28, 2016 2:07 pm    Post subject: Reply with quote  Mark this post and the followings unread

tomsons26lv wrote:
and try testing yourself. Start with a 512x512 pcx to be sure and scale it down until it hits where the extra Width isn't set anymore.

Not going to do that. Randomly trying to recreate something isn't a good use of time when you could either upload ones which crash TS or show the frame data.

_________________
Free Map Editor - Game Requirements - Stucuk.Net

Back to top
View user's profile Send private message Visit poster's website
tomsons26lv
Cyborg Artillery


Joined: 30 Dec 2009
Location: Latvia

PostPosted: Sun Aug 28, 2016 5:49 pm    Post subject: Reply with quote  Mark this post and the followings unread

stucuk wrote:
tomsons26lv wrote:
and try testing yourself. Start with a 512x512 pcx to be sure and scale it down until it hits where the extra Width isn't set anymore.

Not going to do that. Randomly trying to recreate something isn't a good use of time when you could either upload ones which crash TS or show the frame data.

The point of having you try it out was objective opinions not just me most likely poorly trying to explain things and maybe you get the idea why and what is happening if you try it first hand....
But eh whatever..
Worth noting that WW used the -X and a letter in command line in C&Cs (such as -XM to enable Monochrome debug printing to mono screen) for debug modes, its possible ShapeSet's -X is for debugging something.

_________________
Tiberian Dawn, Red Alert, Tiberian Sun ,Red Alert 2,Renegade, Command & Conquer 3,Tiberium and Tiberium Wars and Westwood related image & video archive
https://picasaweb.google.com/113361105083292812413?noredirect=1

Skype live:tomsons26
Don't forget to state who are you otherwise i'll ignore the invite

Back to top
View user's profile Send private message Visit poster's website
stucuk
Geek


Joined: 27 Aug 2002

PostPosted: Sun Aug 28, 2016 11:36 pm    Post subject: Reply with quote  Mark this post and the followings unread

The point of me not is that i have alot to do as it is and you can easily just send a SHP that fails with TS and i can inspect its data to see whats different between it and a normal SHP. Its also possible i would get different results either from me not doing everything you did or simply due to different data or settings.

_________________
Free Map Editor - Game Requirements - Stucuk.Net

Back to top
View user's profile Send private message Visit poster's website
stucuk
Geek


Joined: 27 Aug 2002

PostPosted: Mon Aug 29, 2016 8:23 am    Post subject: Reply with quote  Mark this post and the followings unread

- SHPToolz_2016-08-29.rar

Only just noticed its been about a week without me releasing anything...



Implemented Import/Export 8-bit BMP Spritemap. Since the Palette is stored in the BMP its impossible to have colour conversion errors. It will be larger than filetypes like PNG since its uncompressed but you can put them in ZIP/RAR's if you want to share them.

It stores the Width, Height and Frame Count in the filename when Exporting which saves you having to enter them in the Import Settings bit.

_________________
Free Map Editor - Game Requirements - Stucuk.Net

Back to top
View user's profile Send private message Visit poster's website
Crimsonum
Seth


Joined: 14 Jul 2005
Location: Fineland

PostPosted: Mon Aug 29, 2016 9:33 am    Post subject: Reply with quote  Mark this post and the followings unread

Some points so far:
- The UI is good, no suggestions there.
- I like the animated preview when selecting an SHP file.
- I think the current min and max luminosity values are sufficient.
- It would make sense for the luminosity of the fake map background to change as well, but it could be an option instead of a forced thing.
- A minor thing: If the current SHP is considered a shape with shadow frames (i.e. a unit or building), and you play the animated preview, the preview always skips the shadow frames. You cannot "force" it to show such frame either by moving the slider to a shadow frame. There should be an option to allow viewing shadow frames as well.
- Request: There ought be a tool name/description above the luminosity slider.
- Request: A fake snow background.
- Request: A way to change the speed of the animated preview (on the main window).

_________________


Back to top
View user's profile Send private message
stucuk
Geek


Joined: 27 Aug 2002

PostPosted: Mon Aug 29, 2016 4:01 pm    Post subject: Reply with quote  Mark this post and the followings unread


Implemented ability to load background tiles. Before it was just a static image but now it will tile. Right clicking on the Draw Background button will make a popup menu appear where you can select the background you want (Its populated based on the PNG files it finds in the Backgrounds directory).

Also changed the Animating logic so it will only treat the "animation" as having shadows if "Draw Shadows" is enabled. Otherwise it will play all frames (And not draw the shadows on non-shadow frames).

_________________
Free Map Editor - Game Requirements - Stucuk.Net

Back to top
View user's profile Send private message Visit poster's website
stucuk
Geek


Joined: 27 Aug 2002

PostPosted: Tue Aug 30, 2016 9:27 am    Post subject: Reply with quote  Mark this post and the followings unread



Implemented Used Colours Overlay for the Palette.

Also modified the Open Dialog so that it hides any SHP's which arn't valid TD/TS SHP's (Like TMP files). Does have the side effect that the scrollbar may suddenly shrink as its only checking them when they come into view and then hiding if they are invalid.

P.S If you left or right click a pixel of the image it sets the Left/Right colours on the palette. Its been able to do it for quite a while but i never mentioned it (Your able to use it with the last released build anyway).

_________________
Free Map Editor - Game Requirements - Stucuk.Net

Back to top
View user's profile Send private message Visit poster's website
ApolloTD
Commander


Joined: 19 Nov 2003

PostPosted: Tue Aug 30, 2016 4:28 pm    Post subject: Reply with quote  Mark this post and the followings unread

Can you implement frames halfening tool?

Say you got 30 frames in opened shp, you tell it to reduce to 15 with one quick command which removes frame2, frame 4, frame 6...

I find often got too many frames and need to reduce and doing this manually is just slow and if shadows are turned on, it should remove the counterpart shadow frame.

Back to top
View user's profile Send private message
stucuk
Geek


Joined: 27 Aug 2002

PostPosted: Tue Aug 30, 2016 5:53 pm    Post subject: Reply with quote  Mark this post and the followings unread

See Attachment.

ApolloTD wrote:
if shadows are turned on, it should remove the counterpart shadow frame.

It doesn't need to care if shadows exist. It will work out correctly as your removing all the odd frames (So you would remove the counterparts since the SHP has even frame numbers). The only instance where it would fail would be if you had 2 frames where 1 was a shadow (Since it would be forced to remove the shadow).

-------------------------------------------

Due to the TSHP class it didn't take alot of code:
Code:
procedure TFrmMain.GoButtonClick(Sender: TObject);
var
 Input,
 Output : TSHP;
 X      : Integer;
 OFrame,
 IFrame : PSHP_Frame;
begin
 Input := TSHP.Create;
 Input.LoadFromFile(FilenameEdit.Text);

 Output := TSHP.Create;
 Assert(Input.Count > 1,'Error: Less than 2 frames!');
 Output.AddFrames(Input.Count div 2,Input.Width,Input.Height);

 for X := 0 to Output.Count-1 do
 begin
  OFrame := Output.Frame[X];
  IFrame := Input.Frame[X*2];
  OFrame^.UsedArea := IFrame^.UsedArea;
  OFrame^.RadarCol := IFrame^.RadarCol;
  if IFrame^.PalData = Nil then
  Continue;
  GetMem(OFrame^.PalData,Output.Width*Output.Height);
  CopyMemory(OFrame^.PalData,IFrame^.PalData,Output.Width*Output.Height);
 end;

 Output.CompressionMode := CompressionMode.ItemIndex;
 Output.SaveToFile(ChangeFileExt(FilenameEdit.Text,'_HALFED.shp'));
 Output.Free;
 Input.Free;

 ShowMessage('Done!');
end;

_________________
Free Map Editor - Game Requirements - Stucuk.Net

Last edited by stucuk on Wed Aug 31, 2016 5:13 am; edited 1 time in total

Back to top
View user's profile Send private message Visit poster's website
Crimsonum
Seth


Joined: 14 Jul 2005
Location: Fineland

PostPosted: Tue Aug 30, 2016 7:16 pm    Post subject: Reply with quote  Mark this post and the followings unread

Quote:
It doesn't need to care if shadows exist. It will work out correctly as your removing all the odd frames (So you would remove the counterparts since the SHP has even frame numbers). The only instance where it would fail would be if you had 2 frames where 1 was a shadow (Since it would be forced to remove the shadow).


But if there are an odd number of normal frames, for every removed normal frame it will remove a "wrong" shadow frame, not the one corresponding to the normal frame.

Btw, I tested it on a building SHP with 6 frames total and it removed the shadow frames completely, leaving only two of the normal frames.

_________________


Back to top
View user's profile Send private message
stucuk
Geek


Joined: 27 Aug 2002

PostPosted: Tue Aug 30, 2016 10:26 pm    Post subject: Reply with quote  Mark this post and the followings unread

See Attachment.



FrameHalfeningTool.rar
 Description:

Download
 Filename:  FrameHalfeningTool.rar
 Filesize:  185.13 KB
 Downloaded:  38 Time(s)


_________________
Free Map Editor - Game Requirements - Stucuk.Net

Back to top
View user's profile Send private message Visit poster's website
stucuk
Geek


Joined: 27 Aug 2002

PostPosted: Wed Aug 31, 2016 6:33 am    Post subject: Reply with quote  Mark this post and the followings unread

What millisecond values(Like 10 of them) would you want for the animation speed? Current is 200ms which is 5FPS. Minimum is 16ms in Windows 7, XP i think was 20ms.



Implemented Colour Switcher. Its the CScheme thing. Still need to add a ComboBox to hold the CScheme Categories (So you can filter the list), preview's need the transparent square background thingy and i need to optimise the default cschemes by shoving them in a binary format as it takes way too long to load >250 of them when they are ini files(INI ones would still be supported, just the default ones supplied would be shoved in a single binary file to optimise the loading).

_________________
Free Map Editor - Game Requirements - Stucuk.Net

Back to top
View user's profile Send private message Visit poster's website
E1 Elite
General


Joined: 28 May 2013

PostPosted: Wed Aug 31, 2016 7:38 am    Post subject: Reply with quote  Mark this post and the followings unread

Anim FPS could be from 5 to 20 or 25 FPS. Only felt the existing one was a little slower.

The unused colors could be shown with pure colors like pink, cyan or bright green etc.
Black or dark gray shades are confusing. Use RGB like 0,255,0 or 0,255,255 - choose a
color that does not exist already or give an option for the user to choose.
Edit: Or a pattern like checkered used for transparency or a filled circle or a cross.

Couldn't see the save options in last download, are you giving a separate option for that?

For me export and import are the most used feature of SHP Builder apart from viewing.
If editing is not planned then giving the import and export functionality are the next best
alternative. Some thoughts:

Exporting:
- export file formats choice should be both indexed images and 24-bit colored images
like pcx, png and bmp. GIF for animation. (Check for licensing of those libraries)
- export could use a file numbering format like name xxxxxx.png for individual frames

Importing:
- choosable palette (palettes in case of RA2 civil buildings) in which import has to be done.
- when importing from indexed images, palette index should be used instead of color
mapping.
- when importing from 24-bit images, usage of closest color mapping algorithm could
have choices like Delta-E 2000 etc. Look in SHP Builder.
- fascility for some of palette colors to be deselected during import, so that we don't need
make custom palettes like to avoid importing in glowing color indices (e.g. among the last
16 indices).
- currently number of frames supported by SHP Builder is 9800 frames and XCC Mixer is
1000 frames. This tool could give more like name xxxxxx.png (usage of variable in code
to hold 64K or more count). This may not be used but being aware during coding would
remove the limitation.

Back to top
View user's profile Send private message
stucuk
Geek


Joined: 27 Aug 2002

PostPosted: Wed Aug 31, 2016 8:49 am    Post subject: Reply with quote  Mark this post and the followings unread

After selecting a filename the save options appear.

Why would you need non-index'd images? Your losing colour information when importing and editors like Photoshop/Gimp work fine with 8Bit palettes. Its not like you can use colours outside of the 8Bit Palette. I can understand generating the images in say 3DS Max and needing to import it, but not exporting so you can work in 24bit.

SHP's can have 65535 frames max(Due to Count being a Word) so the limit should be that (SHP Builder can handle SHP's with that many frames. Though the spinedit control is limited to 3000 for some reason...). 9800 sounds like a very odd number.



Pure Colours which are already used in the palette would be a bad idea. Checkered is better as you can easily see whats not a colour.

_________________
Free Map Editor - Game Requirements - Stucuk.Net

Back to top
View user's profile Send private message Visit poster's website
E1 Elite
General


Joined: 28 May 2013

PostPosted: Wed Aug 31, 2016 10:00 am    Post subject: Reply with quote  Mark this post and the followings unread

Editing indexed images in Photoshop is restricted, features like selective color editing
won't be available as those need RGB value to run the algorithm. Moreover editing
doesn't change color of an image but only its color table or palette which is not useful.

The current mechanism of saving a 8-bit bmp is not good for say a 300 frame unit, the
size would be too big. If there are 300 frames then those need to be converted to 24-bit
format for changing colors which then can be imported with another palette to get the
new colors.

The import frame count 9800 is a tested number. SHP Builder would import 9801 frames
but would crash after doing the import. Any higher it gets into some (don't remember
exactly) out of bound problem and crashes without importing. That problem is with
SHP Builder, not a hardware limitation.

Checkered pattern looks fine for unused color. The dark gray could be darker.

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Wed Aug 31, 2016 10:06 am    Post subject: Reply with quote  Mark this post and the followings unread

For the framerate i would suggest implementing it in the same way WW has done it on the Rate= key, so you can see how it would look ingame with the same setting as in art.ini.
Rate defines the number of frames shown in 60s and goes from 1 to max 900

Thus allow values from 1 to 900

In your case the formula for the delay between the frames would be
delay (in ms) = 60000 / Rate

e.g.
the usual speed for many anims is Rate=300
so you would have a 200ms delay between each frame

The fastest the game can show is Rate=900 which is a delay of 66.6ms.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Graion Dilach
Defense Minister


Joined: 22 Nov 2010
Location: Iszkaszentgyorgy, Hungary

PostPosted: Wed Aug 31, 2016 10:29 am    Post subject: Reply with quote  Mark this post and the followings unread

E1 Elite wrote:
Editing indexed images in Photoshop is restricted, features like selective color editing won't be available as those need RGB value to run the algorithm. Moreover editing doesn't change color of an image but only its color table or palette which is not useful.


It has it's uses. I have many times found that quite useful when I was creating custom palette variations for the same animation.

OTOH, GIMP works completely the opposite when it comes to indexed mode, it cannot shift palette colors and don't flatten the image beforehand, so it's the tool you'd find useful.

_________________
"If you didn't get angry and mad and frustrated, that means you don't care about the end result, and are doing something wrong." - Greg Kroah-Hartman
=======================
Past C&C projects: Attacque Supérior (2010-2019); Valiant Shades (2019-2021)
=======================
WeiDU mods: Random Graion Tweaks | Graion's Soundsets
Maintainance: Extra Expanded Enhanced Encounters! | BGEESpawn
Contributions: EE Fixpack | Enhanced Edition Trilogy | DSotSC (Trilogy) | UB_IWD | SotSC & a lot more...

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID
stucuk
Geek


Joined: 27 Aug 2002

PostPosted: Wed Aug 31, 2016 12:45 pm    Post subject: Reply with quote  Mark this post and the followings unread

E1 Elite wrote:
The import frame count 9800 is a tested number. SHP Builder would import 9801 frames
but would crash after doing the import. Any higher it gets into some (don't remember
exactly) out of bound problem and crashes without importing. That problem is with
SHP Builder, not a hardware limitation.

It must be something in the conversion code. Since it can literally load SHP's with 65534 frames (I never tested 65535 as my test had shadow frames) it has to be able to store the actual frame data in the SHP structure it has.

E1 Elite wrote:
Checkered pattern looks fine for unused color. The dark gray could be darker.

Is the following better (Left one):


P.S I don't know if i will code Paint like tools into it at this stage. My current strategy is to work on everything else and then decide. If i did it would be a layer system and id have to create a custom format to store the editor data.

_________________
Free Map Editor - Game Requirements - Stucuk.Net

Back to top
View user's profile Send private message Visit poster's website
E1 Elite
General


Joined: 28 May 2013

PostPosted: Wed Aug 31, 2016 1:04 pm    Post subject: Reply with quote  Mark this post and the followings unread

Left one is good enough for me. Hope there is option for checking current frame and
entire SHP for unused colors.

@Graion Dilach - Not useful was in the context. Had used the same technique to make
custom palettes in the past with Photoshop. Haven't used GIMP in several years now.

Back to top
View user's profile Send private message
stucuk
Geek


Joined: 27 Aug 2002

PostPosted: Wed Aug 31, 2016 4:30 pm    Post subject: Reply with quote  Mark this post and the followings unread



Updated Colour Switcher Progress. Any CScheme which will have no effect on the SHP is hidden, also added categories which show/hide them based on what their category is (Called Game in the CScheme file, but Brown 1, Brown 2,etc are not cnc games i know of #Tongue ). The Palettes in the Colour Switcher will only display the palette colours which exist in the SHP and which are changed by the CScheme.

E1 Elite wrote:
Left one is good enough for me. Hope there is option for checking current frame and
entire SHP for unused colors.


I added unused colours, though its just the opposite of used colours.

_________________
Free Map Editor - Game Requirements - Stucuk.Net

Back to top
View user's profile Send private message Visit poster's website
stucuk
Geek


Joined: 27 Aug 2002

PostPosted: Thu Sep 01, 2016 12:19 pm    Post subject: Reply with quote  Mark this post and the followings unread

- SHPToolz_2016-09-01.rar

Implemented the Binary CScheme file for the default included CSchemes. Its 70KB (Compared to 560KB) and loads instantly instead of taking something like 4-6 or more seconds to load.

_________________
Free Map Editor - Game Requirements - Stucuk.Net

Back to top
View user's profile Send private message Visit poster's website
stucuk
Geek


Joined: 27 Aug 2002

PostPosted: Sun Sep 04, 2016 10:57 am    Post subject: Reply with quote  Mark this post and the followings unread

I started work on the backend for a Layer base editor (Id like to note i may never finish it. No Guarantees). It will be designed internally for speed and ease of use rather than lower memory. For example, each layer will be a full sized palette image rather than just the size thats actually used. Benefit being that coding is easier and it doesn't need to be reallocated each time the used area of the layer changes. The negative is that it will use more memory, though unless you go crazy on layers it shouldn't be an issue (A single 256x256 layer would be ~65KB).

_________________
Free Map Editor - Game Requirements - Stucuk.Net

Back to top
View user's profile Send private message Visit poster's website
tomsons26lv
Cyborg Artillery


Joined: 30 Dec 2009
Location: Latvia

PostPosted: Fri Aug 25, 2017 12:48 am    Post subject: Reply with quote  Mark this post and the followings unread

stucuk wrote:

Flag 1 seems to indicate Zeros(Or Transparency). If you look at canister.shp for example it only has flag 1 when the frame has #0 in it. Fence's in RA2 don't have have flag 1 when there are no #0. So id go on a limb and state that flag one should only be set if there are #0's in the frame.

I got slightly more info now on this, i found where YR checks bit 1 and Hyper helped me figure out what's going on in ShapeSet.
You are correct that's practically it.
When Flag 1 is set that means the image had the specified Transparent index in it, in ShapeSet default check is for index 0x0, you can overwrite it with the command line -T## for example -T01 would make it assume all index 1 pixels are transparent pixels -TFF all index 255 and so on.

Its unclear to us right now why any other values appeared but game only checks for bit 1 and 2, 2 is indeed confirmed as RLECompressed.

_________________
Tiberian Dawn, Red Alert, Tiberian Sun ,Red Alert 2,Renegade, Command & Conquer 3,Tiberium and Tiberium Wars and Westwood related image & video archive
https://picasaweb.google.com/113361105083292812413?noredirect=1

Skype live:tomsons26
Don't forget to state who are you otherwise i'll ignore the invite

Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic Page 3 of 3 [149 Posts] Goto page: Previous 1, 2, 3
Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
Quick Reply
Username:


If you are visually impaired or cannot otherwise answer the challenges below please contact the Administrator for help.


Write only two of the following words separated by a sharp: Brotherhood, unity, peace! 

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.3547s ][ Queries: 13 (0.0179s) ][ Debug on ]