Which script fixes the 4->3 Polygon model error?

Discuss the future of Warzone 2100 with us.
Post Reply
MIH-XTC
Trained
Trained
Posts: 359
Joined: 31 Jan 2014, 07:06

Which script fixes the 4->3 Polygon model error?

Post by MIH-XTC » 14 Sep 2019, 23:43

I found some old graphical models that use 4 polygons (back when WZ used 4 instead of 3) and I need to convert them to use 3.

The models are throwing this error:

Code: Select all

Log message: info    |13:37:13: [_imd_load_polys:163] Invalid polygon size (4)
Log message: info    |13:37:13: [_imd_load_polys:163] Assert in Warzone: C:\projects\warzone2100\lib\ivis_opengl\imdload.cpp:163 (npnts == 3), last script event: '<none>'
Log message: error   |13:37:13: [_imd_load_level:720] (_load_level) unexpected directive 200 4
Berg told me in IRC there is a script to convert the models to use 3 but I forgot the name of the file/script.

Can anyone (or Berg) tell me which file/script to use for this conversion?

I attached a sample model that throws this error. The model is the hover propulsion for light bodies.
Attachments
prlhov1.pie
Sample model that throws the error
(1.87 KiB) Downloaded 28 times

User avatar
WZ2100ModsFAn
Trained
Trained
Posts: 367
Joined: 15 Apr 2018, 17:25
Location: United States.

Re: Which script fixes the 4->3 Polygon model error?

Post by WZ2100ModsFAn » 15 Sep 2019, 01:01

MIH-XTC wrote:
14 Sep 2019, 23:43
The models are throwing this error:

Code: Select all

Log message: info    |13:37:13: [_imd_load_polys:163] Invalid polygon size (4)
Log message: info    |13:37:13: [_imd_load_polys:163] Assert in Warzone: C:\projects\warzone2100\lib\ivis_opengl\imdload.cpp:163 (npnts == 3), last script event: '<none>'
Log message: error   |13:37:13: [_imd_load_level:720] (_load_level) unexpected directive 200 4
Berg told me in IRC there is a script to convert the models to use 3 but I forgot the name of the file/script.

Can anyone (or Berg) tell me which file/script to use for this conversion?

I attached a sample model that throws this error. The model is the hover propulsion for light bodies.
You can use the simplipie converter.
https://github.com/Warzone2100/warzone2 ... implipie.c
I use Ubuntu GamePack By UALinux for gaming. Best Ubuntu Distro for Warzone :D

MIH-XTC
Trained
Trained
Posts: 359
Joined: 31 Jan 2014, 07:06

Re: Which script fixes the 4->3 Polygon model error?

Post by MIH-XTC » 15 Sep 2019, 02:09

WZ2100ModsFAn wrote:
15 Sep 2019, 01:01

You can use the simplipie converter.
https://github.com/Warzone2100/warzone2 ... implipie.c


cool, thanks man. I verified that's the right file.

I went dumpster diving for old models and someone directed me to this site https://wzgraphicmods.sourceforge.io/joomla/

Specifically https://sourceforge.net/projects/wzgraphicmods/files/

Some of the models have timestamps from 2010 O_o

I'm going to see what models we can make stats for and add them to the game.

User avatar
WZ2100ModsFAn
Trained
Trained
Posts: 367
Joined: 15 Apr 2018, 17:25
Location: United States.

Re: Which script fixes the 4->3 Polygon model error?

Post by WZ2100ModsFAn » 15 Sep 2019, 02:44

Looking at the website i also heard warzone is dieing.
I wonder what features they were.
I use Ubuntu GamePack By UALinux for gaming. Best Ubuntu Distro for Warzone :D

MIH-XTC
Trained
Trained
Posts: 359
Joined: 31 Jan 2014, 07:06

Re: Which script fixes the 4->3 Polygon model error?

Post by MIH-XTC » 15 Sep 2019, 03:11

I just imported the propulsions and unfortunately it's not a complete set. I would only be able to use the tracks:

Image

The wheels for light bodies are always grey and do not change colors with the players color.
The wheels for heavy bodies look exactly like what a half-track should be.
There aren't any half-tracks, hovers or VTOL's, the models are the exact same.

The tracks look pretty decent but it's kind of anomalous to only add one propulsion without having a complete consistent set.

I could name these "heavy" tracks but the "heavy" adjective has been played out way too many times. In fact, it reminds me of the scene from back to the future lol.



alrighty, on to the structures... let's see what we have in store for that.

User avatar
WZ2100ModsFAn
Trained
Trained
Posts: 367
Joined: 15 Apr 2018, 17:25
Location: United States.

Re: Which script fixes the 4->3 Polygon model error?

Post by WZ2100ModsFAn » 15 Sep 2019, 03:49

MIH-XTC wrote:
15 Sep 2019, 03:11
I just imported the propulsions and unfortunately it's not a complete set. I would only be able to use the tracks:

Image

The wheels for light bodies are always grey and do not change colors with the players color.
The wheels for heavy bodies look exactly like what a half-track should be.
There aren't any half-tracks, hovers or VTOL's, the models are the exact same.
That's because since 3.1 they switched to TC_MASK pages for the png. You need to copy the file and make a TC_MASK with it.
And then you need to remove unecessary parts for the TCMASK to only affect the propulsion.
Compare this:
https://github.com/Warzone2100/warzone2 ... d-hubs.png
To that:
https://github.com/Warzone2100/warzone2 ... tcmask.png
And then you should see how they got the player color.
Are you using the latest WZGM release?
The latest is 1.0.0
I use Ubuntu GamePack By UALinux for gaming. Best Ubuntu Distro for Warzone :D

MIH-XTC
Trained
Trained
Posts: 359
Joined: 31 Jan 2014, 07:06

Re: Which script fixes the 4->3 Polygon model error?

Post by MIH-XTC » 15 Sep 2019, 04:11

ah okay, I didn't know how the TC masks worked so I didn't bother copying them.

They look much better with the TC masks.
Image

Without the TC masks I was thinking we might have to name them "refurbished" or something lol. They weren't looking very pretty.

Also, here's the structures. Unfortunately they don't have modules so when they're upgraded they use the original modules which doesn't look right when the buildings are being upgraded. I really like the research centers. I think I would remove the base image the structures are built upon, just like how the uplink and laser satellite don't have base images underneath them.

If we can get the graphical part down without any hitches, we can have 2 copies of cyborg factories or research centers and vary the build times, cost and research times etc... Same thing with VTOL pads. We can call these NASDA research center, cyborg factory, vtol rearming pad...

EDIT: Actually, maybe that research center could be a replacement for the command relay center since it doesn't need upgrading and the command relay center is dull looking and pixelated. I'd like to make it 4x2 or maybe even 5x2 instead of 2x2 and double the height. That would be a true command relay center, a full blown bureaucratic center :)

Image

User avatar
WZ2100ModsFAn
Trained
Trained
Posts: 367
Joined: 15 Apr 2018, 17:25
Location: United States.

Re: Which script fixes the 4->3 Polygon model error?

Post by WZ2100ModsFAn » 15 Sep 2019, 20:55

MIH-XTC wrote:
15 Sep 2019, 04:11
Also, here's the structures. Unfortunately they don't have modules so when they're upgraded they use the original modules which doesn't look right when the buildings are being upgraded. I really like the research centers. I think I would remove the base image the structures are built upon, just like how the uplink and laser satellite don't have base images underneath them.

If we can get the graphical part down without any hitches, we can have 2 copies of cyborg factories or research centers and vary the build times, cost and research times etc... Same thing with VTOL pads. We can call these NASDA research center, cyborg factory, vtol rearming pad...

EDIT: Actually, maybe that research center could be a replacement for the command relay center since it doesn't need upgrading and the command relay center is dull looking and pixelated. I'd like to make it 4x2 or maybe even 5x2 instead of 2x2 and double the height. That would be a true command relay center, a full blown bureaucratic center :)

Image
I think the png file is stretched. I'd usually use a different resizing method so it looks correct and pixelated.
I do the same for the old texpages so they look less blurry.
I use Ubuntu GamePack By UALinux for gaming. Best Ubuntu Distro for Warzone :D

Post Reply