Product Chat / Here's an odd one - tree scaling and the editor.

Author
Message
!nullptr
Forum Support
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 3rd Jun 2015 06:34 Edited at: 3rd Jun 2015 06:50
Wasn't sure where to put this because it's not a script issue and I can't call it a bug either. It's one of those "does anyone know why?" threads

I put together a script to scale trees randomly. It adds variety without manually scaling. (script below for those curious but it's not actually relevant).

When I test, everything works fine. Trees scale correctly etc. (see images). I come back to the editor, make any other changes and turn the tree scaling script off in code to keep the trees as they are. It all works perfectly.

However, if I close the editor and come back, without reapplying the script all trees are back to 100%. I thought to myself, to keep consistency I am going to have to save the tree size to file and reapply on map load for scene continuity. BUT... if I create the level after reapplying the scaler, the tree scales are permanently fixed in the standalone - in their scaled versions.

Thus it's not technically a "something is broken" issue because I can simply scale, compile and my trees are a fixed size w/o using a save/load in the standalone. But I am hellishly curious why the editor dumps the scale on map being reloaded on editor restart.

Pic 1 shows after scaling. Pic 2 shows after reloading the editor. All back to 100%. Odd.

AKA SisterMatic (Steam)
Development/ Gaming Rigs
Sys 1: i7-4770 (3.5)/16Gb/128 SSD/3Tb/970gtx/2 x 23, 1 x 27 LCD - Sys 2: i7/8Gb/670gtx/1.5Tb/1 x 23 LCD - Sys 3: Amd Quad/8Gb/645gtx/1Tb/30" LCD

Attachments

Login to view attachments
PM
Pirate Myke
Forum Support
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 3rd Jun 2015 14:04
This could be do to the way the FPE file is written, But I would think that the state of the object, when the map is save should keep them the way you had it.
These tree are hard coded in a way, that also might be hindering this.

This will be good to bring up with Lee and get his thoughts.
As it might just be an out right bug.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

!nullptr
Forum Support
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 3rd Jun 2015 14:08 Edited at: 3rd Jun 2015 14:13
Yes. It's a strange one Mike because compiling the map is fine and keeping the editor running is fine. It's only when you close and reopen.

Fortunately, because it compiles fine as a standalone it's a non issue, just curious why it would occur and if it is a "bug" (I hate that word unless absolutely necessary).

The irony is I was going to pop the script in the script forum as a handy little map tool but the final test failed. I suppose it still can - with the right caveat. Script works as advertised.
AKA SisterMatic (Steam)
Development/ Gaming Rigs
Sys 1: i7-4770 (3.5)/16Gb/128 SSD/3Tb/970gtx/2 x 23, 1 x 27 LCD - Sys 2: i7/8Gb/670gtx/1.5Tb/1 x 23 LCD - Sys 3: Amd Quad/8Gb/645gtx/1Tb/30" LCD
PM
Pirate Myke
Forum Support
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 3rd Jun 2015 14:15
There was a past issue with deleted sprayed objects, not saving in the map when reopening it. Might be similar, that why I call it a possible "bug".

Doing things with scripts on this nature, is new and you may be very well finding issues, that need to be addressed.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 3rd Jun 2015 21:19
I have found with my survival scripts that the scene ends up looking as you left it in the game(all my trees grow and have a random size). Obviously every time you restart the game things will reset back to whatever default you have set them in the script (I have not tried removing them as I am happy with it being random each time). I have been working on a little game based on the same ideas at it's core. I always end up with the scene in the editor looking as the scene was when you exited the game. Running again will then reset back to the original settings in my scripts.

I think the issue here is that GG is remembering the tree size while you are still running the editor, but when you reload it has no info beyond the original FPE setting and so defaults to normal. As you say saving the data to a file is probably the only way to fix it.

This won't help but it shows the system I had ages ago, little has changed since then as I have been waiting on some new commands to make them more useful.


SPECS: Q6600 CPU. Nvidia 660GTX. 8 Gig Memory. Win 7.
!nullptr
Forum Support
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 3rd Jun 2015 22:48
DVader. I'm pretty sure you're right. Like I said it's not a real issue because the standalone retains the modified sizes. Obviously when making tree growth dynamic a save is needed anyway so ultimately it's no drama doing that either.

Nice vid. That's a direction I'm heading and same, a couple more commands and I'm away.
AKA SisterMatic (Steam)
Development/ Gaming Rigs
Sys 1: i7-4770 (3.5)/16Gb/128 SSD/3Tb/970gtx/2 x 23, 1 x 27 LCD - Sys 2: i7/8Gb/670gtx/1.5Tb/1 x 23 LCD - Sys 3: Amd Quad/8Gb/645gtx/1Tb/30" LCD
PM
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 3rd Jun 2015 23:30
...And do not forguet the "MapEditor.log " file, it contain all the items your map have currently.
Perhaps they are loaded with their own harcoded data. (size, properties, etc)

3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 8.1 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM
!nullptr
Forum Support
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 3rd Jun 2015 23:39
Thanks 3com, that's one I hadn't even considered.
AKA SisterMatic (Steam)
Development/ Gaming Rigs
Sys 1: i7-4770 (3.5)/16Gb/128 SSD/3Tb/970gtx/2 x 23, 1 x 27 LCD - Sys 2: i7/8Gb/670gtx/1.5Tb/1 x 23 LCD - Sys 3: Amd Quad/8Gb/645gtx/1Tb/30" LCD
PM
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 3rd Jun 2015 23:50
You are welcome

@ DVader
Nice vid mate, you can gain some money collecting trees, for buy weapons, ammo, foods, healt, and so on.

3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 8.1 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM

Login to post a reply

Server time is: 2024-05-02 21:34:44
Your offset time is: 2024-05-02 21:34:44