Ryandor.com

Forums
It is currently Sun Jul 06, 2025 4:31 am

All times are UTC - 7 hours [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Mon Nov 24, 2003 6:13 pm 
Offline
Apprentice
Apprentice

Joined: Thu Nov 20, 2003 9:01 pm
Posts: 29
Ok i was serching the boards looking for ingeneral info that may help me to make better maps and to help me ask less questions but as it seems all it does is make me wana know more lol

Code:
// Peach Tree with green leaves
0001 0d9c 0000 0000 0000 0000 0d9d 0000 0000 0000 0000


OK this is right out of the items folder grass.txt in mod9. ok the first 0001 is sorda like a percentage like xxx.x% as i have read in a previous post. If i dont want "Peach Tree with green leaves" on grass at all i do is A) remove thoes lines for trees or B) just change that number from 0001 to 0000 right?

And if i want twice as many do i change it to 0002?

Also I kinda also nitcied that the 0d9c and the 0d9d are item id's one being the trunk the other the leaves. What are the other sets of 0's for?

Can i add and take away from that scrip?

Can i make a whole new scrip and name it umm like Test.txt?

How whould i get Dragon to load it?

New topic:

OK what if i want to make a green acers type thing with out any trees but i want to keep the scrip as is and have trees on grass in the rest of the world. How will i go by doing this? Is there a way to just freeze a sertain part of the world?

Also, when i freeze my map i get .txt files created in my static folder..... what are they for and do i need to hold onto them? If i do a second freeze whith these .txt files still in there will i get adverse affects on my map?

Im sorry for all the questions, i should be good for a week or 2 after these lol. Just look at it like this, you help me, then i help the next guy, and so on, and so on, and so on. lol

Peace!

_________________
Image


Top
 Profile  
 
PostPosted: Mon Nov 24, 2003 8:11 pm 
Offline
Slayer of Fools
Slayer of Fools
User avatar

Joined: Tue Jul 02, 2002 4:54 pm
Posts: 1289
Wow that's a mouthful.
Scroll up a few lines and look at the header (reprinted here for convenience)
Code:
 
// ----------------------------------------------------------------------------------
// Syntax :
// [Frqequency] [ItemGroup1] [ItemGroup2] [ItemGroup3] ...
//
// Itemgroup = [Item(hex)] [ZLevel(dec)] [Color(hex)] [Xmovement(dec)] [Ymovement(dec)]
// ----------------------------------------------------------------------------------
//Probably some babble by me.
//Probably some babble by Ry.
// Peach Tree with green leaves
0001 0d9c 0000 0000 0000 0000 0d9d 0000 0000 0000 0000


The first number is the "weight" it is not exactly a percentage. Only Darus knows exactly (maybe Syd if he has the source). It is more akin to a piece of paper thrown in a hat for each number. So the percentage depends on the numbers of all the weights added up.

Then as you noticed you have the item id, then (see header above) the Z offset. This is how far or below the terrain. Then the color if not default (I'm not sure if it works or not) then the X and Y offsets. So for example:
Code:
//Cedar tree small group
0003 0cd6 0000 0000 0000 0000 0cd7 0000 0000 0000 0000 0cd8 0000 0000 0002 0000 0cd9 0000 0000 0002 0000 0cd6 0000 0000 0001 0002 0cd7 0000 0000 0001 0002 0cd8 0000 0000 0000 0002 0cd9 0000 0000 0000 0002 0cd6 0000 0000 0001 0003 0cd7 0000 0000 0001 0003 0cd8 0000 0000 0003 0003 0cd9 0000 0000 0003 0003


That makes a small group of cedar trees around the spot that is picked (that one is courtesy Ry I think).

If you don't want something you can remove it altogether or comment it out with "//". I'm not sure about giving a weight of 0000; try it and let us know. At any rate it is better to comment it out, one less line to parse.

Thou can addeth and thou can taketh away from the scripts to your heart's delight. You can make new scripts and call them whatever you like.

Items.txt is where you get Dragon to place them. Which leads to your second topic. Again read the header and all will become clear. I am not going to say anymore because if you do a search I think you'll find a post I made about items.txt that Ry saw fit to tutorialize.

The files that get created you run through DragonSP, the second half of Dragon. Doing multiple compiles and keeping parts of different ones is an advanced topic, also been discussed at length here; do a search.

_________________
This space for rent.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 24, 2003 8:44 pm 
Offline
Peanut Gallery
Peanut Gallery
User avatar

Joined: Sun Jun 02, 2002 8:53 pm
Posts: 1864
Location: Hayward, CA
I have no idea how weights work for Dragon, but with TSMC they work as follows:

Add up all the weights of everything in a section, les this number be ?A?. Pick a random number between 0 and A, let this be ?B?. Start at beginning of the section, let ?C? be the weight of the first item. If B is less than C, place the item and move on, else add the next item?s weigh to C and check if B is less than that, in which case place the second item and move on. Keep repeating until B is less than C and you move on. So long story short if you have:

Tree 4
Rock 2
Grass 2

Then the total is 8? 50% chance of placing a tree, 25% chance of placing a rock and 25% chance of placing grass. Simple enough.

_________________
Blog: http://www.sydius.org
Web: http://www.sydius.net


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 24, 2003 10:02 pm 
Offline
Slayer of Fools
Slayer of Fools
User avatar

Joined: Tue Jul 02, 2002 4:54 pm
Posts: 1289
Shameless plug for TSMC above :P
You never asked Darus for the source Syd? He was amenable to giving it out to interested people who could actually program (not the common idiot). Would have been worth a look.
I believe that is how the weighting in Dragon works as well (although your explanation was simpler/easier to understand I think).

_________________
This space for rent.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 7 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group