View topic - Features defined by files



All times are UTC + 1 hour


Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: 07 Jun 2005, 06:49 
User avatar

Joined: 16 Aug 2004, 03:36
Location: The Steward's Realm
So i've been poking around the code for the first time and I was thinking it might be possible (of course it is possible, i mean for someone with my skill level of coding, which isnt much) to get MapConv to start placing different and other sorts of features other than the currently defined 16 trees and 1 type of grass, and making it defined by an external file isntead of hard coded like it currently is in featurecreator.cpp.

Featurecreator.h looks like it can work with any kind of feature, so i would already have something to work with.

At the very least, it might be made so that it has the potential accept input for different types of features, and someone else write a seperate GUI to actually let the mapmaker place said features ( Buggi! ).

Just wondering if anyone else is working on this at the moment, and if i should try and pursue this in terms of engine limitations.


Top
 Offline Profile  
 
 Post subject:
PostPosted: 07 Jun 2005, 07:09 
User avatar

Joined: 29 Apr 2005, 06:46
As you know I did the new map converter and can place features with any feature id.

Here is all that is stored in the map file:
Code:
public struct FeatureFileStruct
{
   public int featureType;
   public float xpos;
   public float ypos;
   public float zpos;
   public float rotation;
   public float relativeSize;
}


That's it. featureType is set from 1 to 16 for trees, 0 for grass, and 17 for geovents. Yep, geovents are features.

-Buggi


Top
 Offline Profile  
 
 Post subject:
PostPosted: 07 Jun 2005, 11:51 
AI Coder
User avatar

Joined: 14 Sep 2004, 10:32
Location: Cookieland
I was thinking that a script could be written internally that took arbitrary arguements for which units to load rather than specific function calls to specific units, giving something like features in OTA. I hadnt thought out though so maybe if someone could think it through?


Top
 Offline Profile  
 
 Post subject:
PostPosted: 07 Jun 2005, 16:51 
User avatar

Joined: 21 Apr 2005, 19:46
Yes, scripting is good, but its hard to impliment once everything is written. If you start out with the objective of producing fully scriptable code, then you will most certainly get that. I doubt thats how this project started out though. :?


Top
 Offline Profile  
 
 Post subject:
PostPosted: 07 Jun 2005, 20:19 

Joined: 19 Aug 2004, 16:38
Location: Togliatti, Russia
Maybe instead the main executable could be modified to read a special txt file on map load, placing units (and also, features, since DTs are placed as units, but are features in essense), belonging to a neutral team (team -1?). That way, we get less trouble when moving or adding features to a map (no need to recompile it), and quite a load of flexibility for placing features - as well as neutral units, WC3-style.


Top
 Offline Profile  
 
 Post subject:
PostPosted: 07 Jun 2005, 20:44 
AI Coder
User avatar

Joined: 14 Sep 2004, 10:32
Location: Cookieland
Didnt I do a big post on there being a GAIA player? at least then I could create a tree AI that would spawn new trees and branches, fullfilling aGorms original dream and shutting up the alantai tree people once and for all. Or maybe I could just program a highly flexibl bird subroutine... wings flap... tweeeet... flap


Top
 Offline Profile  
 
 Post subject:
PostPosted: 08 Jun 2005, 09:01 
Site Admin

Joined: 13 Aug 2004, 16:13
CVS version allows maps to point to wreck feature files to include in the map.


Top
 Offline Profile  
 
 Post subject:
PostPosted: 08 Jun 2005, 09:06 
User avatar

Joined: 29 Apr 2005, 06:46
I noticed, can you PM me an example so I can integrate it into my Map Conversion Util in time for the next release?

-Buggi


Top
 Offline Profile  
 
 Post subject:
PostPosted: 08 Jun 2005, 10:12 
Map Creator
User avatar

Joined: 12 Jan 2005, 10:25
Location: Still signing off after all these years
Now thats cool. I take it we can pack our own .ufo in with the map with custom wreks, and point to them, letting us have any feature we like??
If so this would rock in large amounts...

aGorm


Top
 Offline Profile  
 
 Post subject:
PostPosted: 08 Jun 2005, 16:37 
Site Admin

Joined: 13 Aug 2004, 16:13
There is no example to be had I havent tested the code :) But it should just be to add a definition in the map file like the current tree and grass ones but named after a wreck file.


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

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 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

Site layout created by Roflcopter et al.