SWBFGamers

Modding for the Original SWBF1 and SWBF2 => SWBF1 Modding => Topic started by: Red04SWBF on July 01, 2017, 05:03:00 AM

Title: Conversion from SWBF2 to 1 Map - Terrain & Sky Issue
Post by: Red04SWBF on July 01, 2017, 05:03:00 AM
Hello! I need help with this.

I've been at least 1 month researching how to convert a SWBF2 map to SWBF1, and the fact is that I've finally made it with Coruscant: Jedi Temple (with my own method :P).

What I haven't achieved in the resulting map is to clear the collision of the terrain, which apparently looks dark. Here I leave some screenshots where I show you where the problem is...

(https://www.swbfgamers.com/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FkH24sRC.png&hash=eefa53a9156802ed0c6b2347a5289351a5e532d6)(https://www.swbfgamers.com/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FnKG7foN.png&hash=2cf5f3b0d1500f11c802d5310c86a80600fa9827)

The first image corresponds to my own conversion of the map and the second to a conversion of a downloaded map in SWBFGamers.

I also have a problem with showing the stars in the sky. I have entered this code in the cor1.sky file:

Stars()
{
NumStars(8000);
RandomSeed(1);
TwinkleFactor(0.5);
TwinkleFrequency(0.1);
Color(255, 255, 255, 255);
BrightStarPercent(70.0);
AlphaMin(15);
ColorSaturation(0.75);
}


And this happens:

(https://www.swbfgamers.com/proxy.php?request=http%3A%2F%2Fi.imgur.com%2F2eC6dmT.png&hash=8b720e2d4d9fbb94eeae7c0edf8f22a74c2e7efa)(https://www.swbfgamers.com/proxy.php?request=http%3A%2F%2Fi.imgur.com%2Fwq7jfhE.png&hash=bf40ee829f54dbbb52c3f32c9e8054da61f7e912)

If you can help me, I'll thank you!
Title: Re: Conversion from SWBF2 to 1 Map - Terrain & Sky Issue
Post by: Phobos on July 01, 2017, 06:33:44 PM
Not sure about the terrain, but the stars might need increased settings. Try these, if it still doesn't work then post the rest of your SKY file here, as there could be something else breaking it.

Stars()
{
NumStars(4000);
RandomSeed(1);
TwinkleFactor(10.0);
TwinkleFrequency(10.0);
Color(255, 255, 255, 255);
BrightStarPercent(90.0);
AlphaMin(15);
ColorSaturation(0.9);
}
Title: Re: Conversion from SWBF2 to 1 Map - Terrain & Sky Issue
Post by: Red04SWBF on July 02, 2017, 08:51:49 AM
Thanks Phobos! I've been able to resolve it, it seems it was a code error.  :slap:

(https://www.swbfgamers.com/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FuQoB6hg.png&hash=c587a0acf02f8191d39ba5b13a11783e364d4f0b)

Even if you aren't very sure, is there no way to make the terrain collision disappear? I mean something similar like the map of Bespin: Platforms. In this map there's no terrain and the player can fall into the void and die (more or less this is what I mean).
Title: Re: Conversion from SWBF2 to 1 Map - Terrain & Sky Issue
Post by: Led on July 02, 2017, 09:26:41 AM
There is terrain on platforms (SWBF1).  It is just really really far down.
Title: Re: Conversion from SWBF2 to 1 Map - Terrain & Sky Issue
Post by: Giftheck on July 02, 2017, 10:51:04 AM
Quote from: Led on July 02, 2017, 09:26:41 AM
There is terrain on platforms (SWBF1).  It is just really really far down.

I believe it's a sky file setting that makes it vanish when the map is munged.

I think you have to put this in the SKY file under DomeInfo():

TerrainEnable(0);
Title: Re: Conversion from SWBF2 to 1 Map - Terrain & Sky Issue
Post by: Red04SWBF on July 02, 2017, 11:28:46 AM
Thank you very much Gistech!  :cheer: I didn't know it was this line of code...
Title: Re: Conversion from SWBF2 to 1 Map - Terrain & Sky Issue
Post by: AnthonyBF2 on July 02, 2017, 02:07:24 PM
Please beware, SWBF1 does not like SWBF2, mainly models. Expect lots of issues wit collision disappearing.
Title: Re: Conversion from SWBF2 to 1 Map - Terrain & Sky Issue
Post by: Giftheck on July 02, 2017, 02:11:17 PM
Quote from: Anthony_b on July 02, 2017, 02:07:24 PM
Please beware, SWBF1 does not like SWBF2, mainly models. Expect lots of issues wit collision disappearing.

If you have Softimage Mod Tool and the ZETools, that's easily fixable. The way collision is handled was changed between the two games but it more or less just boils down to renaiming the collision primitives to the naming convention used in the first game (IE collision, collision2, collision3 etc).
Title: Re: Conversion from SWBF2 to 1 Map - Terrain & Sky Issue
Post by: Red04SWBF on July 03, 2017, 06:23:51 AM
And how do I do that?
Title: Re: Conversion from SWBF2 to 1 Map - Terrain & Sky Issue
Post by: SleepKiller on July 03, 2017, 06:40:45 AM
Some of tirpider's msh tools have the ability to fix-up the size values in a .msh file after they've been hex-edited. You can search for NAME sections in the msh file using a hexeditor and then rename any p_* chunks you come across, possibly inserting new characters. Then just run the msh file through this http://www.swbfgamers.com/index.php?topic=6680.0 (http://www.swbfgamers.com/index.php?topic=6680.0) and it should fix up everything for you.

This is how I made almost all the conversions I released.
Title: Re: Conversion from SWBF2 to 1 Map - Terrain & Sky Issue
Post by: Red04SWBF on July 03, 2017, 07:43:32 AM
I've opened some .msh files from SWBFII Coruscant map with hex editor. Do you mean all the lines that have p_-so-collision... or something like that? And should I rename these lines, or should I simply add 1 byte?

If so, I'll try to do it in all .msh files and try the tool you mentioned.
Title: Re: Conversion from SWBF2 to 1 Map - Terrain & Sky Issue
Post by: Giftheck on July 04, 2017, 12:56:36 AM
If the name is long enough you should be able to rename it without having to insert any extra bytes. Just make sure to zero out the rest of the name in hex.

IE: p_so_collision1 -> collision1
Title: Re: Conversion from SWBF2 to 1 Map - Terrain & Sky Issue
Post by: Red04SWBF on July 07, 2017, 06:10:14 AM
Quote from: Gistech on July 04, 2017, 12:56:36 AM
If the name is long enough you should be able to rename it without having to insert any extra bytes. Just make sure to zero out the rest of the name in hex.

IE: p_so_collision1 -> collision1

I did it yesterday in this way, but it gave me an error. A countdown appears when selecting units...  :P
Title: Re: Conversion from SWBF2 to 1 Map - Terrain & Sky Issue
Post by: Giftheck on July 07, 2017, 09:20:53 AM
Quote from: Red04 (CC-4398) on July 07, 2017, 06:10:14 AM
I did it yesterday in this way, but it gave me an error. A countdown appears when selecting units...  :P

Collision shouldn't affect that. It's just collision.
Title: Re: Conversion from SWBF2 to 1 Map - Terrain & Sky Issue
Post by: Red04SWBF on July 07, 2017, 09:28:13 AM
Well, something doesn't fit or I haven't done well...

What I cannot understand is why it happens. Exactly what I did to MSH files was the following:

p_-so-collisionABC -> ......collisionABC (in hex to 000000000000)

Then it was when I munged and when I tried the map I got that countdown and the CPs disappeared from the map (it was unable to spawn :/).

But the most surprising thing was when I did the following thing much earlier:

p_-so-collisionABC -> qwertycollisionABC

Then it worked, but the collision was inverted (something too weird).

I think I'm messing up a bit... I have also used the Tirpider tool after hex editing but I had a problem ... I don't know how I have to use it. :P
Title: Re: Conversion from SWBF2 to 1 Map - Terrain & Sky Issue
Post by: SleepKiller on July 07, 2017, 06:23:00 PM
Quick example that I *think* should be correct. I haven't done this in quite a while so I maybe wrong.

So the sections you're looking for look like this. (Which you knew I believe.)



0B 00 00 00 4E 41 4D 45 14 00 00 00 70 5F 2D 73
6F 2D 63 6F 6C 6C 69 73 69 6F 6E 32 31 32 00 00
????NAME????p_-s
o-collision212??

And you want to change them to look like this. Note the null (00) used as padding where we renamed the primitive.



0B 00 00 00 4E 41 4D 45 14 00 00 00 63 6F 6C 6C
69 73 69 6F 6E 32 31 32 00 00 00 00 00 00 00 00
????NAME????coll
ision212????????
Title: Re: Conversion from SWBF2 to 1 Map - Terrain & Sky Issue
Post by: Red04SWBF on July 09, 2017, 01:52:17 AM
Quote from: SleepKiller on July 07, 2017, 06:23:00 PM
Quick example that I *think* should be correct. I haven't done this in quite a while so I maybe wrong.

So the sections you're looking for look like this. (Which you knew I believe.)



0B 00 00 00 4E 41 4D 45 14 00 00 00 70 5F 2D 73
6F 2D 63 6F 6C 6C 69 73 69 6F 6E 32 31 32 00 00
????NAME????p_-s
o-collision212??

And you want to change them to look like this. Note the null (00) used as padding where we renamed the primitive.



0B 00 00 00 4E 41 4D 45 14 00 00 00 63 6F 6C 6C
69 73 69 6F 6E 32 31 32 00 00 00 00 00 00 00 00
????NAME????coll
ision212????????

Thanks SleepKiller. It seems that you are right, now it has worked for me.

But there are still problems with the collision, which is rarely reversed in some MSH. For example when I modified MSH files relative to the Library section of Coruscant: Jedi Temple, the collision of the main floor and columns had disappeared (and before if it had), however the collision of the first floor (the top floor) had been fixed, just like the stairs. Is there any way to fix it?

I have also found that in some MSH files "p_-so-collisionABC" appears in front of "PRNT". Need to remove "p_-so-" too? And you just have to remove it when it puts "collisionABC" on the front? (because I've found "p_-so-collABC", "p_-so-cubeABC", "p_-so-bookABC"...)
EhPortal 1.34 © 2024, WebDev