Jump to content
Sign in to follow this  
Fr3eMan

Substitution of tree and plants on existing islands

Recommended Posts

Hi all, question, is possible via script substitute the existing trees and plants on an island like Stratis with the plants and trees of Tanoa?

I know exist command like hideObjectGlobal, for hide the existing object on the map, but is possible hide and/or substitute?

Share this post


Link to post
Share on other sites

Short answer: Yes, use hideObjectGlobal combined with createVehicle or createSimpleObject but be aware there might be a not insignificant performance-hit to this dependent on how many objects we are talking.

 

Long answer: learn terrain modding and create a mod. Probably better performance-wise.

Share this post


Link to post
Share on other sites

There is no need to replace all the vegetation on the island, plus an area of 1km by 1km is enough just to create an example/showcase of different environmental on same terrain map.

I will try to make a script using the createSimpleObject and createVehicle for understand what's more suitable, additional question, there is somewhere the class lists of trees/bushes?

Share this post


Link to post
Share on other sites
3 hours ago, mrcurry said:

Short answer: Yes, use hideObjectGlobal combined with createVehicle or createSimpleObject but be aware there might be a not insignificant performance-hit to this dependent on how many objects we are talking.

 If it's done before mission start, it won't affect performances at all.

 

@Fr3eMan: if you want to do that for a single player scenario, keep in mind that the amount of data and objects might crash the save system.

Share this post


Link to post
Share on other sites
1 hour ago, haleks said:

If it's done before mission start, it won't affect performances at all.

I don't know, conceptually, adding potentially several thousand new mission objects seems like it could have an effect. Even if the "original s" are hidden they still exist.

 

Sure I imagine the rendering pipeline won't be bothered much if the replacement objects are of similar complexity but more objects spawned during runtime would mean more data to deal with, which in turn could hit things like network and simulation. I could be wrong though.

 

If you got any neat tricks to share please do.

Share this post


Link to post
Share on other sites

@mrcurry: use "super simple objects" locally, their simulation is disabled and they won't generate any traffic on the network. But for MP, you'll have to design your code so that replacement objects are identical on all clients - without broadcasting anything... My current approach with a Remnant related project is to use the data of the original vegetation object to determine the type and positioning of the replacement; but if you choose to do all those calculations at once before mission start, you're looking at increased loading times (possibly more than an added minute)... I ended up using a mix of both : environment around the player is processed during the initial loading screen, and the rest is done dynamically as the player moves around.

 

Given the amount of objects to manipulate in any case, I strongly suggest constantly testing the performance of your code. ^^

  • Like 2

Share this post


Link to post
Share on other sites
19 hours ago, haleks said:

 If it's done before mission start, it won't affect performances at all.

 

@Fr3eMan: if you want to do that for a single player scenario, keep in mind that the amount of data and objects might crash the save system.

 

Thanks @haleks, I can try so to place the objects in an empty area on the editor, like the airport, than hide by module of by script, and just let appear when I need, and test the impact on performance.
The idea is to let it work on MP on a dedicate server.

Share this post


Link to post
Share on other sites
On 11/15/2021 at 3:28 AM, Fr3eMan said:

Hi all, question, is possible via script substitute the existing trees and plants on an island like Stratis with the plants and trees of Tanoa?

I know exist command like hideObjectGlobal, for hide the existing object on the map, but is possible hide and/or substitute?

 

This thread may be helpful to you as a starting point.

 

Check out the script by pierremgi in the fourth post of the thread. 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×