Quantcast

Jump to content

» «
Photo

[SA] How to place grass in-game?

  • This topic is locked This topic is locked
6 replies to this topic
Gramps
  • Gramps

    ★★★★★

  • GTA Mods Staff
  • Joined: 23 May 2008
  • New-Zealand
  • Helpfulness Award
    Contribution Award [Mods]

#1

Posted 06 November 2013 - 06:02 AM

I have no idea how to do this; and couldn't find any information on it either. I've been told that the grass is generated by plants.dat, (which makes sense, when I use the plants.dat file from PO or BSOR, then there is alot more grass, where there was little before) but don't understand the structure of this file, nor can I see where any co-ordinates in that file are.

 

I would like to place some grass from the models/grass folder in-game, but can't find any reference to it in any of the files.

 

Has anyone had any success doing this, and could provide me with a tutorial?

 

For example, I would like to place some grass on the green 'texture' (which is grass) where the Grove Street member on the left is standing.

Spoiler

 

Grove_Street_Families_members.jpg

 


ZAZ
  • ZAZ

    Kernlochbohrer

  • Feroci
  • Joined: 10 Jan 2005
  • European-Union
  • Contribution Award [Mods]
    Helpfulness Awards [Mods]

#2

Posted 07 November 2013 - 08:23 PM

plants.dat is new for me, i assume that it's done by similar method like procobj.dat

 

if don't know about procobj.dat, i'll explain a little bit

Coll files can have several materials like GRASS_SHORT_LUSH or P_UNDERWATERBARREN (look in colleditor)

procobj.dat contains allocations for model to coll materials

example:

P_UNDERWATERBARREN seaweed   21.0 50.0 0 360 0.2 0.8 0.2 0.8 0.0 0.0 1 0

P_UNDERWATERBARREN Starfish  21.0 50.0 0 360 0.4 0.8 0.4 0.8  0.0 0.0 1 0

the game spawns the model random if player moves at the coll material, but just temporarily in the current area and by considering the parameter values

 

plants.dat contains also Coll materials as Surface Names

i think that the placement is done in same way as by procobj.dat

but maybe more complicate when i read the comments:

 

;    PCDid        -     Plant Cover Definition Index for SurfaceType (0-2)
;                    Notes:    1. There must be at least 1 PCDid specified per SurfaceType
;                            2. Each plant definition have own options for plants, but all definitions
;                                must share the same constant SlotID (see below)
;
;    SlotID        -    Plant Slot ID (defines main geometry set and "big" texture ID)
;                    Note:    SlotID must be CONSTANT for all plant cover definitions in SurfaceType

 

 

so, ok, how to allocate a grass model?

the comments says:

 

; ModelID  -  subModel ID (0-3)

ModelID  is listed at 4.param, where you can find 0, 1, 2 or 3

let's look now into grass folder, where you find following files:

grass0_1.dff

grass0_2.dff

grass0_3.dff

grass0_4.dff

grass1_1.dff

grass1_2.dff

grass1_3.dff

grass1_4.dff

grass2_1.dff

grass2_2.dff

grass2_3.dff

grass2_4.dff

grass3_1.dff

grass3_2.dff

grass3_3.dff

grass3_4.dff

plant1.dff

plant1.txd

 

what do you think could mean 0, 1, 2 or 3? :santa:


Gramps
  • Gramps

    ★★★★★

  • GTA Mods Staff
  • Joined: 23 May 2008
  • New-Zealand
  • Helpfulness Award
    Contribution Award [Mods]

#3

Posted 07 November 2013 - 08:29 PM

That clears a few things up for me, will have to have a play with these files over the weekend I think.

So how is a surface defined? How do I know where a surface starts/ends and new one begins?
Can I make new custom surfaces, that may/may-not overlap current surface types?

I think placing grass is going to be ALOT harder than I thought..

ZAZ
  • ZAZ

    Kernlochbohrer

  • Feroci
  • Joined: 10 Jan 2005
  • European-Union
  • Contribution Award [Mods]
    Helpfulness Awards [Mods]

#4

Posted 07 November 2013 - 08:52 PM

surface is defined, better say allocated, by colleditor

open any coll model with colleditor, select a model, click on edit button,

choose TAB: Vertex, Face, Sphere or Box, depending to the type

the symbols right of the modelname gives the type

Select Vertex, Face, Sphere or Box of the model (click on the model)

now you can see the material button, click to that button to expande the popup menue with sub materials

 

adxAC0KP.jpg


Gramps
  • Gramps

    ★★★★★

  • GTA Mods Staff
  • Joined: 23 May 2008
  • New-Zealand
  • Helpfulness Award
    Contribution Award [Mods]

#5

Posted 08 November 2013 - 01:24 AM

Thanks for sharing your pearls of wisdom xD

ZAZ
  • ZAZ

    Kernlochbohrer

  • Feroci
  • Joined: 10 Jan 2005
  • European-Union
  • Contribution Award [Mods]
    Helpfulness Awards [Mods]

#6

Posted 08 November 2013 - 08:52 PM

You're welcome. I'm curious now, what's your progress?

I made some test and have some infos

- the surface model must be big enough to let the gras grow

- "DEFAULT" as surface name in plants.dat let the game crash

- no success with GRASS_SHORT_LUSH or GRASS_LONG_LUSH

 

i made a testground with 2 working materials to let grass grow

download

P_GRASSMID1 and P_FORESTSTUMPS

i needs to diasble the other vegation to have only gras

so deactivate these in procobj.dat

#P_GRASSMID1		p_rubble05col		43.0	50.0	0	360	1.0	1.0	1.0	1.0	-0.4	-0.4	1	0
#P_GRASSMID1		rockbrkq		43.0	50.0	0	360	1.0	1.0	1.0	1.0	-0.2	-0.2	1	0
#P_GRASSMID1		p_rubblebig		43.0	50.0	0	360	1.0	1.0	1.0	1.0	-1.9	-1.9	1	0
#P_GRASSMID1		sand_combush1		33.0	50.0	0	360	1.0	1.0	0.6	1.0	-0.2	-0.2	1	0
#P_GRASSMID1		sand_combush02		33.0	50.0	0	360	1.0	1.0	0.6	1.0	-0.3	-0.3	1	0
#This is a wee twiggy bush
#P_GRASSMID1		genVEG_bush19		20.0	50.0	0	360	0.3	1.0	0.3	1.0	0.0	0.0	1	0
.....
#P_FORESTSTUMPS		genVEG_tallgrass12	15.0	50.0	0	360	0.3	0.6	0.3	0.6	-0.4	-0.4	1	0
#P_FORESTSTUMPS		Cedar1_PO		30.0	50.0	0	360	1.0	1.0	1.0	1.0	-0.1	-0.1	0	0
#P_FORESTSTUMPS		Cedar2_PO		30.0	50.0	0	360	1.0	1.0	1.0	1.0	-0.1	-0.1	0	0
#P_FORESTSTUMPS		Cedar3_PO		30.0	50.0	0	360	1.0	1.0	1.0	1.0	-0.1	-0.1	0	0
#P_FORESTSTUMPS		sm_fir_scabg_PO		30.0	50.0	0	360	1.0	1.0	1.0	1.0	-0.1	-0.1	0	0
#P_FORESTSTUMPS		Ash_PO			30.0	50.0	0	360	1.0	1.0	1.0	1.0	-0.1	-0.1	0	0
#P_FORESTSTUMPS		Pinebg_PO		30.0	50.0	0	360	1.0	1.0	1.0	1.0	-0.1	-0.1	0	0
#P_FORESTSTUMPS		Elmdead_PO		21.0	50.0	0	360	1.0	1.0	1.0	1.0	-0.1	-0.1	0	0

test now the testground

then change one gras type in plants.dat and test again

P_FORESTSTUMPS			0		0		2    <-- change it to 2
P_FORESTSTUMPS			1		0		2    <-- change it to 2

about the model allocation, i'm really confused
i opend the models in 3dmax and with dff viewer
grass0 had following textures

grass0_1.dff texure: gras07Si.bmp   
grass0_2.dff texure: gras07Si.bmp   
grass0_3.dff texure: fuzzygrass2.bmp
grass0_4.dff texure: veg_leaf.bmp   

grass1_1.dff - grass3_4.dff not possible to open with 3dmmax
opened with dff viewer showed always same model and textur entry: gras07Si

plant1.dff : gras07Si.bmp

I checked out then the gras ingame with installed gras mod
Vegetation_Pack_3/MQ Grass by Dumbass-Productions http://www.gtagarage...ow.php?id=14994
and opened also the gras models

grass0_1.dff texure: gras07Si.bmp
grass0_2.dff texure: Áóôåð îáìåíà01.bmp
grass0_3.dff texure: txgrass0_1.bmp
grass0_4.dff texure: trava.bmp

the other models had the same result as the originals
i made screenshots and found following gras textures
txgrass0_0
txgrass0_1
txgrass1_0
txgrass1_1

  • 6Four9 likes this

Gramps
  • Gramps

    ★★★★★

  • GTA Mods Staff
  • Joined: 23 May 2008
  • New-Zealand
  • Helpfulness Award
    Contribution Award [Mods]

#7

Posted 16 November 2013 - 08:01 PM

It all seems a bit too complicated for what I wanted to achieve.

 

So I cheated and put the grass models into an .img, defined it in the IDE, and gave it an empty collision. Then started placing them using MEd.

The grass doesn't look the same, due to it not being generated by plants.dat; but this method does work, and is quicker/easier for putting small bits of grass around.

 

I wish there was an external tool for placing grass, to simplify the process.

 

Thanks for all your help and wisdom though ZAZ, I'm sure once my skills improve a bit, and my understanding on how things work in SA improves, I will be able to come back and review the grass situation.

 

Thanks again.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users