Feature TDF addition

Feature TDF addition

Requests for features in the spring code.

Moderator: Moderators

User avatar
LathanStanley
Posts: 1429
Joined: 20 Jun 2005, 05:16

Feature TDF addition

Post by LathanStanley »

I have a request, within the TDF file on each feature, you can scale the feature, ok....

how about a feature rotation?? even if it is only 0,90,180,270 it'd be VERY helpful...

Namely because right now, I have to make a seperate feature, model, dot color, everything to change the feature rotation... if the TDF can change the rotation, it can at least lower the number of models used, though the featuremap would still need the same number of different color dots.. etc.

its not like I EFFIN NEED THIS OMFGORZS!
but it'd be quite nice and handy... :-)

ideas? :-)
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Post by zwzsg »

I remember it was once said that the feature orientation is stored in the map, just mapconv default them all to 0.

So what we need is not yet another TDF tag, but a newer mapconv that allow us to specify feature angle.

(Plus it would be much nicer to have the same TDF for all features turned in varied ways.)
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

You could use a LuaGaia script in the map, combined with SetFeatureRotation()
(it's currently called SetFeatureDirection(), but that's soon to change). That also
allows you to create randomly oriented unit wreckages at run-time.

LuaGaia.main.lua:

Code: Select all

for _,fid in ipairs(Spring.GetAllFeatures()) do
  local fdid = Spring.GetFeatureDefID(fid)
  locaf fd = fdid and FeatureDefs[fid] or nil
  if (fd.name == "SpecialFeature") then
    Spring.SetFeatureRotation(fid, 0, math.pi * 2 * math.random(), 0)
  end
end
User avatar
aGorm
Posts: 2928
Joined: 12 Jan 2005, 10:25

Post by aGorm »

Yes.... but we dont want it random, we'd just like to be able to set it to teh rotation we want. Or would that let us?

How do you get LuaGaia scripts to run in a map anyway for that matter... did I miss a memo?

aGorm
User avatar
Quanto042
Basically OTA Developer
Posts: 778
Joined: 22 Feb 2006, 03:01

Post by Quanto042 »

I dunno, i like lathan's idea best. I don't want to mess with mapconv any more than i have to. And Lua scripts are a pain <--- not a scripter

Mapping is an artists realm, not a programmers, lets keep it that way.
User avatar
aGorm
Posts: 2928
Joined: 12 Jan 2005, 10:25

Post by aGorm »

Well, whatever the solution is, lets just have a solution! Obviolsy I'd rather not have to delve into Lua...

aGorm
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post by smoth »

as an artist you want proper tools. having a proper feature placer with the ability to assign rotations to said feature and then map conv handle all the rotations as you have precisely designated is better for an "artist"
User avatar
MadRat
Posts: 532
Joined: 24 Oct 2006, 13:45

Post by MadRat »

Giving him a new variable for feature orientation in no way screws with old maps if it simply defaults to zero.
User avatar
Quanto042
Basically OTA Developer
Posts: 778
Joined: 22 Feb 2006, 03:01

Post by Quanto042 »

I'm just saying that I myself would find it easier to simply edit TDF tags than have to fuck with mapconv for longer than i want to.
If someone can come up with a functioning feature placer the implements rotation then fine so be it. But at the moment i don't want to fuck with scripting, or programming on any large scale.

Editing one "Rotation Tag" on a TDF file would be fine with me.

Messing with LUA or Mapconv on the other hand, would be a massive pain in the ass.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Post by zwzsg »

Well, already there is no other way than messing with MapConv to add custom features. You have to edit that fs.txt to add feature names, and add some pixel to the feature map. This is already what you do. So if next to the feature name in mapconv you could add an optionnal angle, it wouldn't be any more fucking with mapconv already.


However, having to have separate tdf for each rotation of a feature is a great pain. If I decide to change the maxdamage, the metal value, or whatever property of the feature, I have many TDF to edit instead of one. Since I prefer feature to have progressive destruction, like TA wreckage, I have to keep track of as many as angle "featuredead=" strings of features, which mean I can't just copy'n'paste TDF, and, even let's say I need 8-way rotation, maintaining 24 TDF is way more brainfucking than maintaining 3. This is why I don't a "Model Rotation TDF Tag". And I counter the "but you don't have to use it argument by:
- If it was done, there would be even less incencitive to add a proper way to control feature rotation at map creation.
- This is feature bloat. If we make a new FBI or TDF tag for everything, soon the list of tags Spring handle & modder must be aware of will rise so high no one will ever know them all. Make new tags when they're really needed, not when there is already two other ways for same effect.

The issue is just that we need someone to make us a new version of mapconv, and I'm not sure anyone wants to bother with that. More annoying is that I don't know where to find the source code of lastest mapconv, and I don't even know which is the lastest mapconv! Mother's mapconv (non-optimised because the optimised crash on some PC)?, Nitrus's mapconv? similar to Nitrus but for new map format? Is there a SVN for mapconv, and was it used by Nitrus, Mother, or whoever messed with mapconv source last?

- Edit: nevermind, Nitrus is for the old sm2, and doesn't support custom feature, so, like I used to know, mother's is the lastest one. And I think the SVN is up to date.
- Edit: Attempting to make it myself.
- Edit: zomg, mapconv now reads png and no one told me! (But I have to find that IL/il.h)
- Edit: it wants some boost file, no idea where to get them from. Google leads me to .... https://spring.clan-sy.com/svn/spring/t ... unctions.h which is preciselly why I need that "boost" thingy. Nevermind, http://www.boost.org seem to be the place.
- Edit: It wants LIBBOOST_REGEX-BCB-D-1_34.LIB I guess this is something that you get by compiling the regex bit of the boost library under my BCB (Borland C++ Builder), but my borland C++ builder 6 fails at reading the bcb6.mak included with boost, and I'm getting lost with the hugness of that boost thing. Gargh, why couldn't MapConv have been kept simple and free of those 546546 dependancies?
- Edit: ohowoh, I followed the instructions, and it's doing ... stuff.... in a dos windows. Looks like my *.lib have been made.
- Edit: I was about to do the same for LIBBOOST_FILESYSTEM-BCB-SD-1_34.LIB, but it appears they didn't include the bcb6.mak for filesystem. And I have no farking idea what is that bjam they talk about.
- Am I really about to compile the source code to make an executable that will be an installer of a "jam" compiler that will help me compile and build the library that I need in order to be able to compile such a tiny console application?



I wonder, how are features stored in the smf? How easy is it to edit feature angles on an already existing smf? Can Spring's magic LUA write files, and how unfeasible is it to use it to make an interactive feature placer and rotationner?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

zwzsg, boost is in the VCLibs package along with the IL library and everything else you need.

nirtus is for sm1* not old sm2.

and the new map format isnt a compiled format, however the feature loading uses the same mechanism as sm2 which requires a compiler.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Post by zwzsg »

So you're saying that if I had ticked "use the VCL" when I made new console project under BCB6, it would have found all those libs all alone from Borland's VCL? I just tried, and no, it still asks the same boost lib and IL libs. Or do you mean something else by "VCLibs package"?

Anyway, I evenutally managed to compile the whole boost thing, and have now moved to why does it says my DevIL.lib, ILU.lib and ILUT.lib "contains invalid OMF record, type 0x21 (possibly COFF)"? I guess I'll have to recompile devIL as well. Oh noes! Devil requires five other libraries, including that Libpng that I once gave trying to get working.
Last edited by zwzsg on 14 May 2007, 14:50, edited 1 time in total.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

He means the vclibs package mentioned here.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Post by zwzsg »

Ah ok. Thanks. But the libs of that package give me the same message about "Invalid OMF record".

For devIL I workarounded it by running Borland's "implimb" which turned the dll into lib that Borland could read, but since there's no dll but only libs in that spring-vclibs, that won't work.

Right now I have "[Linker Error] Unresolved external 'boost::filesystem::native(const _STL::basic_string<char, _STL::char_traits<char>, _STL::allocator<char> >&)' referenced from C:\...\FILEHANDLER.OBJ
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

Dont use borland, its all unsupported and nobody used it. Better try codeblocks+mingw I think
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Or visual studio 2005 express. Chances are youll never get it working with borland and if you do nobody will be able to use it. Borland compilers are ancient relics of the 1990s. You look at them but nobodies going to use them.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Post by FLOZi »

DevCPP ftw.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Post by zwzsg »

I thought a tiny commandline app such as MapConv would compile with anything, but it seems I'm wrong. No idea why it can't find that boost::filesystem::native(...), I added loads of boost's filesystem's lib to the project yet it stills can't find that thing.

Woah, I merely recompiled the project whole, and now I have a fatal error, internal compilator error at 0xc7dab3 with base 0xc10000 in perl_matcher_common.hpp

I think I'll just give up trying to compile C++ source and get back to the comforting warmth of mapping & modding.

So I'll now revert to my usual whining at dev: Please change mapconv so it use an optional angle, in degree, after feature names in "fs.txt".
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

You have an issue with borland not the c++. Ditch borland, uninstall it, consign it to the trash can, you wont get any use out of it.

btw devc++ == outdated mingw32

Your better getting codeblocks then copying over the uptodate mingw32 as devc++ wont compile AIs or spring correctly.

However netbeans 5.5 is better for a lot as it doesnt have hacky UI glitches and issues, such as not being able to copy paste with rightclick on codeblocks, and a much nicer interface.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Post by Kloot »

Code::Blocks is also fairly out of date itself TBH, just get Eclipse and combine it with a recent mingw (and the mingw libs).
Post Reply

Return to “Feature Requests”