• Hello and welcome to MSFC. We are a small and close knitted community who specialises in modding the game Star Trek Armada 2 and the Fleet Operations modification, however we have an open field for discussing a number of topics including movies, real life events and everything in-between.

    Being such a close community, we do have some restrictions, including all users required to be registered before being able to post as well as all members requiring to have participated in the community for sometime before being able to download our modding files to name the main ones. This is done for both the protection of our members and to encourage new members to get involved with the community. We also require all new registrations to first be authorised by an Administrator and to also have an active and confirmed email account.

    We have a policy of fairness and a non harassment environment, with the staff quick to act on the rare occasion of when this policy is breached. Feel free to register and join our community.

Notepad++ Plugin for ODFs?

Majestic

Administrator
Staff member
Administrator
Seraphim Build Team
Joined
17 Apr 2006
Messages
18,274
Age
39
Back early last year over at A2Files there was a plug-in for Notepad++ being made but sadly it was never completed.

I was wondering if anyone who had the know how and drive to do this would be willing to make one for the community. Many of us here use notepad++ for our odf work and a plug-in to show up errors and colour code parts of the code would be very useful. A FO version would also come in handy as many modders these days have made the transition to that platform.

So this is a call out to anyone who is interested in something like this.
 

Majestic

Administrator
Staff member
Administrator
Seraphim Build Team
Joined
17 Apr 2006
Messages
18,274
Age
39
Sort of but for Notepad++, as it does everything I need. I actually used it for upgrading the website and making some sub-domains that I haven't showed yet.
 

Dominus_Noctis

Lasciate ogni speranza...
Joined
18 Aug 2010
Messages
409
Could indeed by nice to have a Notepad++ tool like that :)

We have a tool we (and by we, I mean Zebh, praise him) are in the process of building for debugging purposes, which may eventually see the light of day. It is not based on Notepad, but it can screen all 9000+ ODFs in a matter of a few seconds :sweat: Unfortunately it will probably only be good for finding errors and never be built up into a tool that can service so many types of files with parent-child relationships.

STAUM is good, but unfortunately it is not accurate (and sadly it was never completed) - there are dozens of fake commands there (which won't affect the validity of course, since they aren't referenced by the exe), a spattering of commands that don't belong to a type of file, and others that have incorrect attributes (calling a float a boolean etc), not to mention dozens of missing commands too. This usually will not matter however, as A2 is a lot less strict about syntax than most modders think (for instance, if you have a boolean, like canAttack, set to 123543, it will simply be read as "TRUE"), but it does restrict creativity in some cases. An updated tool that takes into account proper parent-child classlabel relationships would be fantastic ... now somebody just needs to build it :cry2:
 

Dominus_Noctis

Lasciate ogni speranza...
Joined
18 Aug 2010
Messages
409
Google is thy friend :)

It's a powerful text editor, search and compare tool that supports many languages. It's quite lightweight and a generally very flexible tool. :cool:
 

Terra_Inc

MSFC's Cheshire Cat
Staff member
Site Manager
Necromancer/Troll hunter
Kitten Commander
Joined
16 Dec 2009
Messages
3,121
Age
34
I can do one, yeah. No problem. :thumbsup:

Does the Guide have a complete list of FO commands? I'd need one, don't want to go hunting through the thousands of ODFs. :sweat:
 

Majestic

Administrator
Staff member
Administrator
Seraphim Build Team
Joined
17 Apr 2006
Messages
18,274
Age
39

Terra_Inc

MSFC's Cheshire Cat
Staff member
Site Manager
Necromancer/Troll hunter
Kitten Commander
Joined
16 Dec 2009
Messages
3,121
Age
34
Okay, I have the syntax highlighting completed and most of the ODF commands marked as keywords. The physics and race commands are still missing, as are some other minor things, but it looks quite nice already.

View attachment odf_beta.zip

How to install this? Open the View menu, click on the User Defined Dialog thing and press the Import button. A custom language named STA2 ODF should appear at the bottom of the language list.

I'll see if I can get it completed today, if not, tomorrow.

FO code is a completely different thing and could easily take days or even weeks, depending on how many commands have been added.
 

Majestic

Administrator
Staff member
Administrator
Seraphim Build Team
Joined
17 Apr 2006
Messages
18,274
Age
39
I'll certainly check it out in the morning Terra, thanks for doing this. I can understand the FO one will take quite sometime consider all the new code and stuff included. I didn't even expect something so quick well anything at all to be honest. :cool:
 

Terra_Inc

MSFC's Cheshire Cat
Staff member
Site Manager
Necromancer/Troll hunter
Kitten Commander
Joined
16 Dec 2009
Messages
3,121
Age
34
I'll certainly check it out in the morning Terra, thanks for doing this. I can understand the FO one will take quite sometime consider all the new code and stuff included. I didn't even expect something so quick well anything at all to be honest. :cool:

It was actually quite easy. I think I spent about an hour getting the commands from sb34 and putting them one by one into the keyword tag. The rest may take similarly long, but wth, it's worth the work.

Here are some notes about it.
Commands are displayed in dark red. Numbered commands such as weapon1, weapon2 etc. appear bright red, as NP++ can't ensure that they are used properly. I had to work with prefixing to make this possible, so terms like weaponfoo1 will also be colored bright red despite not being a valid command.
Numbers are colored purple, strings ("hp01") are colored dark blue. Comments are green.

Oh, and if you work with long odfs (I imagine that FO people have that a lot), you can use //< and //> to form blocks that can be folded together to get a better overview of the ODF. Since they count as comments for A2, they're disregarded by the engine. Other editors or NP++ without the ODF language file will not be able to show them as foldable blocks.
 
T

thunderfoot

Deleted Due to Inactivity
Former MSFC Member
Holy Cats(pardon the expression, no pun intended) that was some very fast work, Terra!
 

CABAL

<< ■ II ▶ >>
Staff member
Administrator
Star Navigator
Rogue AI technocrat
Joined
15 Aug 2009
Messages
3,511
Age
32
Don't forget the shieldGeometryName line since I don't think it's on SB34.
 

Dominus_Noctis

Lasciate ogni speranza...
Joined
18 Aug 2010
Messages
409
The command list in the guide is unfortunately not yet complete - the Weapon list is complete, the GameObject has about 15 commands missing at the moment. Ordnance, Config, and Explosion are not finished currently, but are getting there :sweat: .

Be very careful when using the commands from SB34 or BBoM - there are many many commands which share the same problem with STAUM (and many commands undocumented by both).
 
T

thunderfoot

Deleted Due to Inactivity
Former MSFC Member
A lot of the ODFs I placed into the Physics Project are unrecognized by STAUM. STAUM was originally written to be used with A1. When used as intended it works as intended - a quick way of finding typos. The undocumented ODFs in the Physics Project come up as faults in STAUM when scanning through an ODF which references them. Since I already know what I wrote, I can safely ignore these. The Commands list available at StarBase34 is StarBlade's effort to make Westwood's BBoM more accessible and easier to use. The commands in the list which are documented and explained are correct. I know this because I helped with a few of them. Side effect of getting the Physics Project to work correctly without causing a CTD event. StarBlade was, and is, very conscientious about documentation on the commands he included. He may be the only person I know who gets as angry with himself for messing up someone else's install as I do when I make that mistake. We both went ridiculous lengths to avoid causing a crash to someone's install. Since the majority of the people who D/L and use a mod have little interest in doing for themselves, we made sure the things we could prove are the only things we changed. We modders sometimes forget the majority of the Community simply expects to plug something in and have it work. Because we can make it work as advertised on the tin. When any instruction can be misunderstood by a player it will be misunderstood. If StarBlade did not know or was not certain what a Command did, it is not listed or changed from Westwood's BBoM. In effect, the Commands list at SB34 is the same list with additional information which was discovered and published. Being "very careful" with SB34's Commands List means one is repeating the process of "being very careful" with the Commands List in BBoM. Even now, there are very few people who have actually read through the entire BBoM. For its day, it is quite impressive and there are very few mods, be they single ship or full blown TCs, including FO, whose creators did not look at the BBoM for an answer to a question at least once.

I would imagine someone decompiling the exe and going thru it line by line to determine what does what and where and to what would be the certain way to ensure no undocumented commands were placed into this project. But where is the fun in that, hey? I do not think one of these would be possible for FO unless it is written by Doca or Optec. Nor do I think one of these for FO will ever have a complete list of all the commands referenced through the .dll hooks.
 

Dominus_Noctis

Lasciate ogni speranza...
Joined
18 Aug 2010
Messages
409
I trust very strongly that the list was well intentioned for both guides, as were the descriptions, but there are still a very many commands that are not documented correctly in SB34 or simply copy paste from the A2 dev descriptions or BBoM without testing them for validity - I can point out a very few here as examples:

maxHealth = #
maxShields = #
Both of these are floats, not integers.

SHOW_MOVEMENT_AUTONOMY
Not a real command

recrewRate = #
Rate at which the repair ship recrews the vessel being repaired.
A float, and it only affects how fast the rate of Recrew is (set by Facility)

animation = 0 / 1 / 2
If your station's .SOD is animated, this switch activates it. "1" means it's animated once. "2" means the animation is continuous.
Animation takes 4 values : 0,1,2,3.
0 = No animation
1 = Animation plays once from the last time increment
2 = Animation plays continuously
3 = Animation plays once and freezes on the last frame

freighterName = "!!"
Name of the ship used as a freighter for this station. Has to be an actual mining ship. Can't be a warship.
Can be any ship, including any GameObject (like a Blackhole, Ion Storm, etc)

detectRange = #
Part of the Species 8472 Transmuter. This determines how far out it can "detect" resources beyond its sensor range.
Not used for the Transmuter - for GameObjects this is used for the MineArray classlabel, which incidentally is used for 8472 mines and not:
Oddly enough, this seems to do the same thing as "p_mining", which A2 relies upon in standard orbitals. Perhaps because of that, A2 doesn't seem to use this classLabel at all.
 
T

thunderfoot

Deleted Due to Inactivity
Former MSFC Member
Ya know what? You're way smarter and much more knowledgeable about all things A2 than I'll ever be, Dom. And you cannot pass by a point to prove this to everyone in earshot. Since it takes two to have a disagreement, I reckon I'll just go wander a different part of the forum. You've won! I am defeated! Happy? From now on, wherever you are, I'll check first before I wander in, okay?
 

Dominus_Noctis

Lasciate ogni speranza...
Joined
18 Aug 2010
Messages
409
Mate, I'm not trying to make this personal in any regard - I think it's just important that the information being relayed is correct when it comes to what is actually possible in A2. I'd hope for sure if I made a mistake somebody would point it out, as has happened many times before too :thumbsup:

If something is wrongly documented, wouldn't you want to know rather than spend hours trying to figure out why the command doesn't work the way it's supposed to according to a guide? Again, it's not a personal attack, it's not about being superior or being inferior, it's about providing the most useful resource to everybody. I'm not even the one who writes the command list on the guide - Doca puts that up, and I simply test each command to figure out the functionality and compare it to existing information on der interwebz, from other modders, including TUN, Blade, Doca and Optec and whoever else has pertinent information.

I do NOT know much more about A2 than you most likely - I'm a newbie when it comes to modding Armada, and I learn as I go. And intelligence, if it can be measured, is in the eye of the beholder :cool:. For instance, I still have not documented the physics commands and thus do not know the functions :).
 

CABAL

<< ■ II ▶ >>
Staff member
Administrator
Star Navigator
Rogue AI technocrat
Joined
15 Aug 2009
Messages
3,511
Age
32
Can be any ship, including any GameObject (like a Blackhole, Ion Storm, etc)

This is true for A2, but not for A1. In A1, it can be any ship or station, but not other objects such as blackholes.
 

Terra_Inc

MSFC's Cheshire Cat
Staff member
Site Manager
Necromancer/Troll hunter
Kitten Commander
Joined
16 Dec 2009
Messages
3,121
Age
34
In any case, for the NP++ plugin it doesn't matter what a command actually does, only that it exists. And I feel that that is going to be a problem with FO's ever changing coding. :sweat:
 

CABAL

<< ■ II ▶ >>
Staff member
Administrator
Star Navigator
Rogue AI technocrat
Joined
15 Aug 2009
Messages
3,511
Age
32
I just started testing this and it's really awesome so far. There are a couple things though; attack_pathx and #include are not highlighting. Also, looking at the stock fcruise3.odf, some lines such as attackPower have the variable end with f. I'm not sure if the f does anything, but it's black now and looks odd next to the bright pink number.

As a little side note, I haven't used Notepad++ before and I'm having way too much fun with the //< and //> tags, lol.
 

Majestic

Administrator
Staff member
Administrator
Seraphim Build Team
Joined
17 Apr 2006
Messages
18,274
Age
39
This is looking really go this far Terra, one thing however scaleSOD isn't coloured nor the 1.2.5 patch by FO command maxBuildableNumber, this is for stock A@ as I know you haven't started on FO yet and I also am sure you just haven't gotten to those commands yet as it's a lot of work and you've done a heap in such a short time. :thumbsup:
 

Dominus_Noctis

Lasciate ogni speranza...
Joined
18 Aug 2010
Messages
409
The f and any other symbols like ; are counted as blank spaces (so they do nothing) :)
 

Terra_Inc

MSFC's Cheshire Cat
Staff member
Site Manager
Necromancer/Troll hunter
Kitten Commander
Joined
16 Dec 2009
Messages
3,121
Age
34
I just started testing this and it's really awesome so far. There are a couple things though; attack_pathx and #include are not highlighting.
This is looking really go this far Terra, one thing however scaleSOD isn't coloured nor the 1.2.5 patch by FO command maxBuildableNumber, this is for stock A@ as I know you haven't started on FO yet and I also am sure you just haven't gotten to those commands yet as it's a lot of work and you've done a heap in such a short time. :thumbsup:
Yep, there is still work to be done! :yum:

Also, looking at the stock fcruise3.odf, some lines such as attackPower have the variable end with f. I'm not sure if the f does anything, but it's black now and looks odd next to the bright pink number.
As Dom said, I'm not sure whether it actually has a purpose - f denoting a fraction does not seem necessary, as I rarely see a modder using it yet everyone's mods work perfectly. I might include it as an operator though, if people want it.

As a little side note, I haven't used Notepad++ before and I'm having way too much fun with the //< and //> tags, lol.
They're really practical! Imagine you're coding in java or C++ and you have a sourcefile with 20 methods, all about ten or twenty lines, you easily lose the overview. In these languages, the { and } as part of the code are used to fold code blocks. They form semantical blocks that actually have a meaning. But A2 has no natural blocks, nor has it delimiters to enclose them. So we need to use comments in a weird way to do it. It's a lot of fun... :lol:
 

Dominus_Noctis

Lasciate ogni speranza...
Joined
18 Aug 2010
Messages
409
The "f" simply is a leftover from the C++ compiler of A2 - it indicated that they were calling the command a float and has no syntax effect at all in A2 :) . ";" closes a command in C++, but likewise, in the A2 ODFs it has no syntax effect at all. It is important to remember that the ODFs are simply the output of A2, and are not part of the executable and do not need these syntax strings.

The syntax of the ODFs is really very simple: you don't even need comment lines to make a comment. I.E.:

shieldPad = 1.2 //valid command
{insert empty space which doesn't show up in the quote... :sweat:}shieldPad = 1.2 //This command is totally ignored because of the empty space in front of the command
hello out there, I am a comment
//I am too, just now you've made sure the command is proceeded by an empty space
 

Dominus_Noctis

Lasciate ogni speranza...
Joined
18 Aug 2010
Messages
409
Double post... but just wanted to state that the GameObject section in the guide is now complete and contains all FO/A2 ODF commands for the section.
 

Terra_Inc

MSFC's Cheshire Cat
Staff member
Site Manager
Necromancer/Troll hunter
Kitten Commander
Joined
16 Dec 2009
Messages
3,121
Age
34
Hay everyone, keep an eye on this! New version coming up, hopefully completing stock A2 commands! Yay! :excited:

Also, a question to the community: Should I include A1 commands as well? IIRC there weren't many A1-only commands, so if people want that, I might add them to the list.
 
T

thunderfoot

Deleted Due to Inactivity
Former MSFC Member
Might as well make it work for both, Terra. It shouldn't add that much more complexity to it.
 

Majestic

Administrator
Staff member
Administrator
Seraphim Build Team
Joined
17 Apr 2006
Messages
18,274
Age
39
I agree with Thunder, with the new A1 patch by the FO Devs we may see some more A1 mods coming out and so this would be very helpful.
 

CABAL

<< ■ II ▶ >>
Staff member
Administrator
Star Navigator
Rogue AI technocrat
Joined
15 Aug 2009
Messages
3,511
Age
32
Has there been any more work on this? Also, I seem to have lost my copy of the plugin at some point and I'm having a hard time finding the latest download link so if somebody would like to point me to it I would be very grateful.
 
Top