Jump to content
Sign in to follow this  
djukel

New universal dynamic grass script

Recommended Posts

hmm   rofl.gif i just topped the 100 post count for this topic  yay.gif

insint there a way for grass without addons?

and whats the lasest and most best to use so i can use it lol

Share this post


Link to post
Share on other sites
insint there a way for grass without addons?

Nope...

Quote[/b] ]

and whats the lasest and most best to use so i can use it lol

ThruYerStErNuM's grass addon combined with his/djukels script gives IMO the best grass to date. There are others grass addons around but this is really good and have a reasonable FPS hit if used correctly.

You can download it from links earlier in this thread...

/Christer (a.k.a KeyCat)

Share this post


Link to post
Share on other sites
Quote[/b] ]Sorry but i don´t get the Abstract Any running.

When I described how to use that I meant it to be for use with the sqm2sqs interpreter only, but I havent been able to get the new version of that program done yet unfortuneatly.

I have to leave to visit parents on 'vacation' for about 10 days now, but I did get a MUCH more efficient version of the scripts done, and its all here

Share this post


Link to post
Share on other sites
Quote[/b] ]
Quote[/b] ]insint there a way for grass without addons?

Nope...

Yes there is. Like this for example:

grass.sqs=

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

_plr = _this select 0

_xp = (getpos _plr select 0) - 50;

_yp = (getpos _plr select 1) - 50;

_xend = _xp + 100;

_yend = _yp + 100;

#xloop

_grass = "AAA472" camCreate [_xp, _yp, 0.5];

_xp = _xp + 2.5;

?_xp == _xend : _xp = _xp - 100; _yp = _yp + 2.5;

?_yp == _yend : player groupchat format ["Grass spawned in %1 seconds.", _time]; exit;

goto "xloop";

Execute with [player] exec "grass.sqs";

Share this post


Link to post
Share on other sites

OK, my bad! But since there is one major flaw with this solution (grass will be rendered on roads etc.) and that ThruYerStErNuM's grass addon is really nice I know what I choose  tounge2.gif

/Christer (a.k.a KeyCat)

Share this post


Link to post
Share on other sites

LOL, that's not "my solution", just a quick example, that I made in a couple of minutes just to prove my point.

I think the need for addon is only because of custom grass model, you could make an addon free version of this dynamic grass script.

Share this post


Link to post
Share on other sites

Copy that MH...

/Christer (a.k.a KeyCat)

Share this post


Link to post
Share on other sites

I made some testing and got it to stay out of roads automaticly like this:

bushes.sqs=

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_plr = _this select 0

_xp = (getpos _plr select 0) - 500;

_yp = (getpos _plr select 1) - 500;

_xend = _xp + 1005;

_yend = _yp + 1005;

#xloop

_xr = _xp + random 10 - 5;

_yr = _yp + random 10 - 5

B setpos getpos nearestobject [_xr, _yr];

A setpos [_xr, _yr];

_D = A distance B;

A setpos [0,0,0];

B setpos [0,0,0];

?_D < 14.9 : goto "skip";

_r = random 1;

?_r < 0.33 : _grass = "AAA170" camCreate [_xp, _yp, 1]; _grass setdir random 360; goto "skip";

?_r < 0.66 : _grass = "AAA171" camCreate [_xp, _yp, 1]; _grass setdir random 360; goto "skip";

?_r < 1 : _grass = "AAA172" camCreate [_xp, _yp, 1]; _grass setdir random 360; goto "skip";

#skip

_xp = _xp + 15;

?_xp == _xend : _xp = _xp - 1005; _yp = _yp + 15;

?_yp == _yend : player groupchat format ["Grass spawned in %1 seconds.", _time]; exit;

goto "xloop"; Script needs game logics named A and B to work. Exec with [player] exec "bushes.sqs";

Here's some pics:

No grass

Grass

A 'small flaw'

Town

Town

Share this post


Link to post
Share on other sites

Nice work MH but to me that's more like bushes and not really grass!? Anyway, always nice to have alternatives but for me I stick with ThruYerStErNuM's nice rolling grass.

/Christer (a.k.a KeyCat)

Share this post


Link to post
Share on other sites

Well yeah, it's not an alternative to dynamic grass, just a little experiment of mine, but it is a simple, easily modifiable, MP compatible and addon-free way for mission makers to add some vegetation easily to those huge empty fields of Flashpoint.

Share this post


Link to post
Share on other sites

As promised MCPXXL last week I finally got around to clean up my version of djukels orginal grass script and finish the data table for Jakerod's nice Avignon island.

MCPXXL if you read this get in touch via ICQ! I'm hoping you can host it???

/Christer (a.k.a KeyCat)

Share this post


Link to post
Share on other sites

OK, just talked with MCPXXL and he will host the script later tonight (my own server is currently down)...

To try it you will need Jakerod's nice Avignon island and of course the grass addon.

Jakerod's Avignon Island 1.00

ThruYerStErNuM's UWAR Grass Addon 1.20

The script is MP compatible and will work with any island but I've only done the grass data table for Avignon so far. Hope to do more islands later and I know djukel did some for some FDF island.

Stay tuned for a link to the script...

/Christer (a.k.a KeyCat)

Share this post


Link to post
Share on other sites

Just sent the script and demo mission to MCPXXL and you can grab it here...

http://www.matrix5000.org/KEY_DG_100.zip

It simple to use but just a few comments about it...

1. Just approach the table and select the grass height and density from the action meny (this can only be done once per mission, to try other settings you have to restart the mission).

2. It may take a while (~10-15 seconds) before all the grass is dynamicly generated around you and this also applies if you move fast in car etc. (this is done to save CPU resources).

Also note that there are some areas with little or no grass on the island.

3. For various reasons I only recommend you to use "Low grass" in multiplayer (read whole thread for more info about MP).

4. Grass density is selectable between D500-D2000 and what you use depends on what hardware you have. Myself use "D1000" or "D1500" without any noticable framerate loss.

Also note that the dynamic grass is generated independently on each client in MP so each person must select the height/density if they want any grass at all and again my recommendation is low grass only in MP else you may experience strange AI behaviors...

Enjoy!

/Christer (a.k.a KeyCat)

PS: Thanks for hosting it MCPXXL  smile_o.gif

Share this post


Link to post
Share on other sites

NP Keycat ...

After a short Test i can say Superb Work...

And now the next Question  rofl.gif

As i direct sucessfull made other Type of Grasses in this Demo Mission ...

I ask me ? Is there something like "smal and little Stones" out there ...or can someone make some ?

Share this post


Link to post
Share on other sites

Just downloaded the grass along with Keycat's script. Very impressive work. This makes those large open fields much better. And then to the question:

How to add this script into islands? Keycat, you made one for Avignon, how? I tried to browse through the thread but I came up empty handed. I found the sqm2sqs program but I'm not sure how to use that exactly. smile_o.gif I'd love to add this to a few islands.

Share this post


Link to post
Share on other sites

There is no step-by-step guide but all info is in this thread.

/Christer (a.k.a KeyCat)

Share this post


Link to post
Share on other sites

Indeed, I just red the whole thread more thoroughly than I did last night, I now have a pretty good idea on how to use it. Will experiment once I get home from work and add this to Jungle Everon. smile_o.gif

Once again, you're pioneers making our OFP experience better! Can't wait to try this out in MP Coops.

Share this post


Link to post
Share on other sites

If you have any specific questions just ask and I will do my best to help you out...

I think I mentioned this before but here are two tips that helps when placing out the flag objects to make the grass table.

1. Set placement radius on the flag object to 200 m. That way you can easily see when they are overlapping each other.

2. Turn on "Show Textures" in the editor.

/Christer (a.k.a KeyCat)

Share this post


Link to post
Share on other sites

Jungle Everon done, this one should work for regular everon too. Some places, like where two roads are just a bit too close together, I couldn't place the flag objects. It wouldn't be nice to have the grass overlap a road now would it? smile_o.gif So there's some open spaces along some roads. Damn, I was hoping to fill a particular gap at Dak To/Montignac so it'd suit my mission. If someone wants this, I'll upload it. smile_o.gif

Share this post


Link to post
Share on other sites

is this a joke ... you only want to tease us right yay.gif

of course we want to have it biggrin_o.gif

Share this post


Link to post
Share on other sites

Excellent!

I recently had an idea to make my script dramatically more efficient, and this weekend or sooner I'll make a program to convert those object positions into my new system, so everyones work with djukels system will be released with my next grass addon, along with a clear and exact step by step guide to making your own island configurations.

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  

×