MinMax Spaz

MinMax-Games.com

The water cooler of outer space
  
It is currently Thu 21 Sep, 2017 6:49 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 34 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Programmers and Avid Modders! COLLECT HERE!
PostPosted: Mon 18 Apr, 2011 12:34 pm 
Offline
Clockwork Personnel
User avatar

Joined: Fri 25 Feb, 2011 7:58 pm
Posts: 432
Location: London, GB
Not going to tl;dr the opening post:

If Spaz or any next installment were to allow some sort of modding interaction with the game, what would be your preferred method of interaction?

Skinning? (replacing files physically?)
Using a modding tool?
Scripting language? (If So which one?)
Or what else?

How would you want to bring something to the Spaz World?

_________________
Here to help
Useful Topics:
The Rules (Updates Frequently)
Bug Submission
Known Bugs (Needs updating)
more as they appear...


Top
 Profile  
 
 Post subject: Re: Programmers and Avid Modders! COLLECT HERE!
PostPosted: Mon 18 Apr, 2011 1:58 pm 
Offline
Scout
User avatar

Joined: Fri 25 Feb, 2011 11:13 pm
Posts: 46
From all the modding systems I saw so far I liked those most where you could just add files, which overwrite any existing files, but not physically.

So you just have one "mods"-folder, add put all your mods in there and anything the game finds there has priority before the standard code.
That way an addition can be handeled the same way like an rewrite of existing features.

It's better than what Minecraft has so far (no real intended modding support by software, but the possibility to do so) where you have to open the program and really inject your own code, corrupting the game if done wrong, because the original code is simply inavailable (because you have overwritten it)

By giving them just priority instead of really overwriting them your can fallback on the original code if the modded code generates critical errors. Your can put a message like "Your mod doesn't work" and ignore the broken code it instead of a highly cryptic system-error like "The program doesn't work", with the game absolutely unplayable until fixed.

So far so good.

As of actually making mods we have to know a little bit more about the structure of the program itself. I read that lots of content is just provided as unpacked raw stuff, not hidden in any way (have to remember the almost unfindable content files of "The Sims 3"... a nightmare). Furthermore it has a lot of stuff in .dso-containers (named very self-explaining - thanks devs!), which seem to be scripts.

If they are, they fit into the put-it-all-there-concept and we just need the tool they used to pack the scripts into .dso-containers.

As they said, new content is just a manner of a phew lines of code. Sounds modding-friendly!


Top
 Profile  
 
 Post subject: Re: Programmers and Avid Modders! COLLECT HERE!
PostPosted: Mon 18 Apr, 2011 8:24 pm 
Offline
Clockwork Personnel
User avatar

Joined: Fri 25 Feb, 2011 7:58 pm
Posts: 432
Location: London, GB
So... you prefer manual addition/replacement of files?

I'd have to say I prefer this as well but I would appreciate wider access to code full add-ons to the game. A modding tool however I'm against but that is really only my opinion.

_________________
Here to help
Useful Topics:
The Rules (Updates Frequently)
Bug Submission
Known Bugs (Needs updating)
more as they appear...


Top
 Profile  
 
 Post subject: Re: Programmers and Avid Modders! COLLECT HERE!
PostPosted: Tue 19 Apr, 2011 1:11 pm 
Offline
Scout
User avatar

Joined: Fri 25 Feb, 2011 11:13 pm
Posts: 46
Modding tools are a double-edged sword:

On the one hand modding gets easier and probably more people make mods in the first place, but on the other hand a modding tool needs special effort from the devs and limits the possibilities mostly.

However, there were modding tools powerful enough to create new games (remember Starcraft and the DotA-Mod, which is now alomst an own genre-group).

But when given just the knowledge about how to communicate with the interfaces of the game code, complete freedom is possible.


Top
 Profile  
 
 Post subject: Re: Programmers and Avid Modders! COLLECT HERE!
PostPosted: Tue 19 Apr, 2011 2:31 pm 
Offline
Clockwork Personnel
User avatar

Joined: Fri 25 Feb, 2011 4:56 pm
Posts: 178
Perhaps a simple mod tool for us non programmers.

To create weapons, ship types, loadouts etc. And an SDK for the code heads among us.

Chris


Top
 Profile  
 
 Post subject: Re: Programmers and Avid Modders! COLLECT HERE!
PostPosted: Tue 19 Apr, 2011 5:54 pm 
Offline
Gyro
User avatar

Joined: Wed 13 Apr, 2011 10:14 pm
Posts: 102
chrislove01 wrote:
And an SDK for the code heads among us.

YES SDK!!!!!

_________________
FOR THE SWARM!!!!!
FOR MOTHER RUSSIA!!!!!
Have Worked With: C#, HTML, Ada95, XML, SQL, and PHP


Top
 Profile  
 
 Post subject: Re: Programmers and Avid Modders! COLLECT HERE!
PostPosted: Tue 19 Apr, 2011 9:17 pm 
Offline
Scout
User avatar

Joined: Fri 25 Feb, 2011 11:13 pm
Posts: 46
I don't have that much experience in programming, but writing a file in a specific format doesn't sound that hard.

*if* a tool is needed it would be so simple, even I coud write it from scratch...

Just a user interface with some boxes to wirite the desired numbers in, an export button, done.


Top
 Profile  
 
 Post subject: Re: Programmers and Avid Modders! COLLECT HERE!
PostPosted: Tue 19 Apr, 2011 10:27 pm 
Offline
Clockwork Personnel
User avatar

Joined: Fri 25 Feb, 2011 7:48 am
Posts: 265
Location: The netherlands
XML is the most common in modding isnt it?

_________________
The all seeing eye, Wielder of the banhammer

Please read the Forum guidelines before posting
Anything related to the forum dont hesitate to PM or e-mail me


Top
 Profile  
 
 Post subject: Re: Programmers and Avid Modders! COLLECT HERE!
PostPosted: Wed 20 Apr, 2011 1:11 am 
Offline
Scout
User avatar

Joined: Fri 25 Feb, 2011 11:13 pm
Posts: 46
Uh... xml should not be seen that flat in my opinion... xml is just a way of presenting information formally.
xml can contain ANY type of data, provided they are human- and machine-readable, which is also the main reason why xml was invented in the first place: giving programmers a general language they can give computers data without converting it into a bitwise form (so-called binaries, (almost) impossible to read for humans (there are rumors that there are people who can read binary code))

Long story short, xml may be the format they used to format their data, but maybe they created their own custom format+interpreter.

However, xml is SO general, there are phew defined languages that use this format compared to its possibilies (have to think of svg, which is actually xml, as well as html, both describing completely different stuff).

And to put it even shorter: xml != xml

You literally have to make your own interpreter for each application, at least when you are operating outside the common and well-defined languages (like the languages I mentioned before (html, svg, many more), which is a very common case.
xml gives you a lot of possibilites to organize data (human-readable)

As I said: xml isn't flat.
Are you living on a sphere or an irregular and ill-shaped ellipsoid? (this planet) - same problem

Complete proof about the way we have to write our mods can only given by a dev, so we will wait until further information about the code arrvies...

edit: to answer your question: Yes, it is.


Top
 Profile  
 
 Post subject: Re: Programmers and Avid Modders! COLLECT HERE!
PostPosted: Wed 20 Apr, 2011 3:36 am 
Offline
Developer
User avatar

Joined: Fri 25 Feb, 2011 3:39 am
Posts: 1767
Just to quickly chime in, we are monitoring this thread, so feel free to get your ideas down here.

Right now we are focusing on getting the beta ready so our focus on modding topics is limited, but this thread will be a good starting place for us when we begin to make our modding plan.

One thing I do know though is that modding will likely use Torque Script. It is like an un-typed C and is what we use. It is very easy to use and the initial modding will mostly involve altering data within data structures, so anyone should be able to use it no problem.


Top
 Profile  
 
 Post subject: Re: Programmers and Avid Modders! COLLECT HERE!
PostPosted: Wed 04 May, 2011 4:26 pm 
Offline
Clockwork Personnel
User avatar

Joined: Fri 25 Feb, 2011 7:58 pm
Posts: 432
Location: London, GB
Sorry I haven't kept track of this thread that I've started but had a quick re-read to refresh my memory.

What you've said about XML is true to say, however Blorfy just confirmed for us that it'll most likely be in a version of C, which is easy enough to get your head around.

Unfortunately this means for some of you less clued up users, making an alteration to the game will be a learning curve for you. Still, I'm sure theres many among us, including myself, and most likely Blorfy, will put it into bite-sized guides for people wanting to have a go for themselves.

A brief suggestion, though may be a while till theres modding capability, but if theres anyone out there who has strong vision for modding, capability to code, or anyone who has graphical skills - please step forward because I feel it may be a good move to get everyone together and direct our efforts better. Feel free to reply to this thread to express an interest.

_________________
Here to help
Useful Topics:
The Rules (Updates Frequently)
Bug Submission
Known Bugs (Needs updating)
more as they appear...


Top
 Profile  
 
 Post subject: Re: Programmers and Avid Modders! COLLECT HERE!
PostPosted: Wed 04 May, 2011 6:50 pm 
Offline
Gyro
User avatar

Joined: Wed 13 Apr, 2011 10:14 pm
Posts: 102
I'm in for code (hoorah C languages)

EDIT: I feel I should point out that I'm just a college sophomore (for 2 more weeks) and my "real life" experiences comes down to one high school internship and a "real life" project my class just finished

_________________
FOR THE SWARM!!!!!
FOR MOTHER RUSSIA!!!!!
Have Worked With: C#, HTML, Ada95, XML, SQL, and PHP


Top
 Profile  
 
 Post subject: Re: Programmers and Avid Modders! COLLECT HERE!
PostPosted: Wed 04 May, 2011 6:56 pm 
Offline
Clockwork Personnel
User avatar

Joined: Fri 25 Feb, 2011 7:58 pm
Posts: 432
Location: London, GB
You'll be more than welcome to be a part of this group, as long as you've got a basic programming syntax idea, then you should be fine, I'll be coding in this project of modding too so I'll happily help you improve your coding skills along the way :)

_________________
Here to help
Useful Topics:
The Rules (Updates Frequently)
Bug Submission
Known Bugs (Needs updating)
more as they appear...


Top
 Profile  
 
 Post subject: Re: Programmers and Avid Modders! COLLECT HERE!
PostPosted: Wed 04 May, 2011 9:01 pm 
Offline
Dart

Joined: Fri 25 Feb, 2011 10:18 pm
Posts: 12
As initial modding will only be altering data structures (see Blorfy's post), the learning curve shouldn't be any higher than learning the syntax for data structure manipulation. Which should be relatively simple for anyone tech savvy enough to find their keyboard.
How much actual code access we can get through this will depend largely on how the developers incorporate the Torque interpreter into the game, and what hooks are applied for us to tie into.

I can very well imagine that the capabilities we get to hook into the system will be limited. Being able to hook into absolutely everything would be a pain to dump into the code after the fact, some things you just NEED to restrict to keep your system secure.
Some reading (/nerd) reveals the TorqueScript interpreter provides file I/O (though only in the game folder, which is good) and Network access. Something you'll usually not be happy to give your modders access to. Because the general populace will generally not have the knowledge required to go through the mod code to find out what it is the mod does exactly.

And to be completely honest, those of us that can. Generally won't be able to be assed doing so for every little mod out there.

What code access we actually get will depend alot on how the scripting is already embedded into the game. And how much the devs can restrict calls to certain TorqueScript libraries, or even certain in-game libraries to prevent the entire thing from borking over in horrible horrible pain.
Although the latter isn't much of a priority, plenty of games exist where mods can make everything crash.


*end nerd rant*


Top
 Profile  
 
 Post subject: Re: Programmers and Avid Modders! COLLECT HERE!
PostPosted: Wed 04 May, 2011 10:37 pm 
Offline
Clockwork Personnel
User avatar

Joined: Fri 25 Feb, 2011 7:58 pm
Posts: 432
Location: London, GB
Thanks for taking the time to reply to this thread, Aeterno80. I'd like to start by saying that my previous post about a high curve was not aimed to the introductory modding stages, if you read a long a little, it was aimed toward the later stages of modding implementation.

While I agree things must be restricted, you shouldn't worry too much about being restricted to hell, I'm sure Blorfy here would agree that if modding was to be brought in on this game, it would have to be discussed as to what the community would like to do, and the furthest it will go before we reach your cockblock could be from a new plot/story/cannon a long with brand new (or more) factions, new weapons and ships, even hangar extensions as for more AI assistance. Surely this sort of step our way wouldn't be as easy as a few data structures or be detrimental to the game. Now I agree that overloading or crashing may occur but that is ofcourse the modder's job to make sure that doesn't happen if they're being ambitious.

Still, good seeing you in the forums and hope you enjoy SPAZ.

P.S. Feel free to jump on board with us when modifications are implemented :)

_________________
Here to help
Useful Topics:
The Rules (Updates Frequently)
Bug Submission
Known Bugs (Needs updating)
more as they appear...


Top
 Profile  
 
 Post subject: Re: Programmers and Avid Modders! COLLECT HERE!
PostPosted: Wed 04 May, 2011 11:14 pm 
Offline
Dart

Joined: Fri 25 Feb, 2011 10:18 pm
Posts: 12
I'm not that worried about the restrictions in a general sense. I'm just interested in how the incorporation of the Torque interpreter handles the restrictions, and how much extra work this would cause for Blorfy. Enabling these things post-design usually means rewrites of significant pieces of code.
Front-loading of the extra modded scripts and perhaps other assets, depending on how the current scripts hook in, rewriting the hooks for variable extensions along with (at least what I would do) an interface for each of these that people have to extend. A lot of things to make it happen are non-trivial.

New ships, weapons and such would be relatively trivial, and would require only changing of a few data structures in most cases. Hangar extensions might require some user interface changes which would open up a whole other ball park in terms of modding.
Particularly because Torque is probably not an active part of the graphical engine itself. Opening this up would probably require a lot of work, though it would be awesome to have, considering it also opens up a whole lot of new possibilities.

Learning curve for those things *shrug* getting people to see the syntax probably isn't too big of a deal. If you give them public interfaces to extend, while keeping the non-library functions of SPAZ that the Torque engine might have access to private (not sure if torque supports access restrictions in such a way) there's not all that much you need to teach them in terms of 'how to make a mod', and there'd be relative security against borking over critical systems.
Of course then we'd end up in the discussion what hooks we want, and what data we'd actually want access to.

Not trying to be the killjoy, if that's what it seems like. I'm an old fashioned code monkey, the technical stuff interests me even more than the game itself, and I don't get many chances to get down to the gritty stuff.


Top
 Profile  
 
 Post subject: Re: Programmers and Avid Modders! COLLECT HERE!
PostPosted: Wed 04 May, 2011 11:50 pm 
Offline
Clockwork Personnel
User avatar

Joined: Fri 25 Feb, 2011 7:58 pm
Posts: 432
Location: London, GB
AH! I see where you're coming from now. Unfortunately we'll have to wait to have this little discussion until way after release when Blorfy considers implementing this system for the community, as a lot of what you say hinges on estimation of his capability and restraint in terms of how far he is willing to go with this. Time will tell but I do certainly hope you're around when this comes onto the cards.

Just to back track a little however, lets say hypothetically that he is not going to pat us on the head like children and give us trivial things to modify, using torque's edited library in C to essentially create add on modifications will be a treat I look forward to.

[Lets try getting the topic back on the rails]

_________________
Here to help
Useful Topics:
The Rules (Updates Frequently)
Bug Submission
Known Bugs (Needs updating)
more as they appear...


Top
 Profile  
 
 Post subject: Re: Programmers and Avid Modders! COLLECT HERE!
PostPosted: Thu 12 May, 2011 4:17 pm 
Offline
Scout
User avatar

Joined: Fri 25 Feb, 2011 11:13 pm
Posts: 46
Being raped by an impossible story mission, I took a closer look at the game files to see if I can change anything about the raping.

So far I figured out that I woud have to raplace/rewrite one of the .cs.dso files, which is a compiled script, threfore not editable.
I guess the game's way of doing this won't work (reverse engineering!)...

...we might need some parts of the content source code.

Help me helping you help us all^^


Top
 Profile  
 
 Post subject: Re: Programmers and Avid Modders! COLLECT HERE!
PostPosted: Thu 12 May, 2011 5:51 pm 
Offline
Developer
User avatar

Joined: Fri 25 Feb, 2011 3:39 am
Posts: 1767
When modding time comes around, we will release non complies versions of these files. For now they are compiled to prevent hundreds of bugs that would crop up as a result of fiddling.

Also, usually if a story mission is too hard, it is a good idea to adventure a bit and collect some components. If you chase the green arrows too hard, you'll be in for a tough play through.


Top
 Profile  
 
 Post subject: Re: Programmers and Avid Modders! COLLECT HERE!
PostPosted: Thu 12 May, 2011 6:36 pm 
Offline
Scout
User avatar

Joined: Fri 25 Feb, 2011 11:13 pm
Posts: 46
Sadly this is not the usual case, but happens to several people with bad luck: viewtopic.php?p=4059#p4059

I think I have to quit that playthrough and start again, maybe with more stars (this one had 200)

But I am happy you plan to give out the uncompiled scripts, thank you!


Top
 Profile  
 
 Post subject: Re: Programmers and Avid Modders! COLLECT HERE!
PostPosted: Fri 13 May, 2011 12:37 am 
Offline
Clockwork Personnel
User avatar

Joined: Sat 26 Feb, 2011 12:12 am
Posts: 582
I refuse to be collected here !

_________________
"It works cause I stand next to it radiating science and wonder."
Image


Top
 Profile  
 
 Post subject: Re: Programmers and Avid Modders! COLLECT HERE!
PostPosted: Mon 23 May, 2011 8:30 am 
Offline
Scout

Joined: Tue 17 May, 2011 6:33 am
Posts: 35
Location: Estonia
Antario wrote:
XML is the most common in modding isnt it?
I'd say .ini-like files are more common (sections with key-value pairs for data). In the end it doesn't really make much of a difference except that hand-editing XML is a bit more cumbersome than .ini but programmatically editing (writing a custom editor to read, parse and write) XML is easier and XML makes it far easier to define more complex data hierarchies.
Scroey wrote:
You literally have to make your own interpreter for each application, at least when you are operating outside the common and well-defined languages (like the languages I mentioned before (html, svg, many more), which is a very common case.
That would be needed for any other file format as well.

If possible I'd take XML or maybe even JSON format as it would be prefered over INI-like flat files as it would make it far easier to define hierarchies and parsing-creating them with external programs would be easier as there exist libraries for doing it. It should even be possible to define object-inheritance in those formats if needed so that you can only override a few parameters or behaviors for things.
Colin wrote:
A brief suggestion, though may be a while till theres modding capability, but if theres anyone out there who has strong vision for modding, capability to code, or anyone who has graphical skills - please step forward because I feel it may be a good move to get everyone together and direct our efforts better. Feel free to reply to this thread to express an interest.
Well, I haven't actually modded many games but I know technically I could do it. I've done a bit of tinkering with space empires 4 and 5, wrote a simple HL1 mod to add sawed-off shotgun with one hell of a kickback, created custom-scripted maps for SC1, spent ages with X-Com mods and probably some other things I can't remember right now. I'm a C++ coder by profession so I have no problems reading and writing that C-like scripting code and I could probably whip up a simple GUI for editing some basic parameters if needed :)


One thing that I'd like to hear is if the game has been done by basically hardcoding the parameters and AI scripts in code or are they read from some data files. That would give a rough idea of how easy would be to make it moddable or what can be expected to be allowed to be modified by players. From the little I've found so far reading the forum it seems like the game has most data and scripts defined in actual code files meaning it would take a whole lot of work to actually add modding support. Knowing what's already there would make it easier to propose how the modding might look like. I have a rough idea of what it could be in an ideal world but I don't think proposing it without knowing limitations would make much sense if actually implementing it would require rewriting half the game :)

______________________________________________________

Now that I'm not at work any more I have a bit of time to write down the ideal way of how I'd like to see modding. I'll write three posts in sequence
1) general overview of what I'd like to see
2) description how space empires 5 supports modding
3) short conclusion


First nesseccity was already mentioned: you should be able to override default implementation by just having same (partial) file structure in some mod dir. E.g have a "mods" dir and each dir under that is considered a separate mod. Say you have mymod/bacgrounds/startingscreen.png in there then it would override the default background image on starting screen. If you have mymod/data/missiles.xml then it would override the default missiles.xml file. If you only have a few missile type descriptions in there then it would override only those that are actually described and would take the rest from the default. E.g if you only want to chaneg gravity missile your custom XML would only contain information about that missile type and others would come from default files.

That isn't the most flexible system but it would be a start. Oblivion has it a little bit better by allowing you to define more than one mod and say in what order it should load it. Each mod that gets loaded would override anything that is already there so that if you have three different mods with each one changing those gravity missiles then only the last one would be used.

Drawback with that kind of flexible system is that it could easily cause problems if some mods rely on hardcoded values (e.g 7 research levels for crew, 4 ship sizes, existence of some certain user-made component from another mod, ...). Good thing would be that it would be easy to combine different mods. Say one guy would replace only images, another one changes a few parameters for components, other adds new ships, someone redefines galaxy-creation scripts and someone changes AI scripts. If you can't "inherit" from multiple mods it would make it rather complicated to use different mods at same time. It would be possible to create custom tools to merge multiple mods into one but it would take quite a bit of effort and would make it a bit harder for "dumbusers" to enjoy the modding.

Actual development-wise I don't think it would be that much harder to support multiple mods at a time. Once you already support overriding defaults just iterate for every mod in sequence and it should work :)


Second what should be possible to be changed. Ideally it would be pretty much everything except the engine part that puts it all together. Basically all graphics and sounds are quite trivial. Raw data parameters for different things is second no-brainer. E.g for a rocket it would be how much damage it does to each possible mitigation type (shields, armor, hull, custom-defined), flight range, acceleration, max speed, turn rate, explosion radius, flight speed, turn rate, what animation to use when launching/flying/exploding and anything else that has any impact on it. In addition I would like to modify things like what research lines there are, when is something opened up, ship weapon layouts, objects in system etc. It should be possible

Third but best part would be the ability to override things with scripts. I'm not quite sure what, if anything, is scripted in the game right now but I'd love to be able to tune things like galaxy and system generation, ship flight AI and overall "big picture" AI for zombies and other factions and perhaps basic UI layout so it would be easier to add hangars, research lines or ship types. Maybe even allow having data values for items be defined as script function callbacks, that would allow making things even more dynamic. Obviously things that are used inside inner-loops should probably not be executed as scripts but their values should be cached at some point. E.g if a shield damage mitigation depends on some function that takes in current system parameters (distance from core, material density, how big planet is close by, the type of ship being used, ...) then it should be cached on entering the system or if any of the parameters change for some reason.

Storyline changes would be another obvious thing to be modded but that would quite definitely be done through scripting.

______________________________________________________

Next I'll describe a bit how Space Empires 5 supports modding. It's best if you familiarize yourself a little on SE5 wiki but here is an example how one would define a Quantum Torpedo and what effects it:

Whenever there is "Formula" in a parameter name it means you can define a simple foruma there to make the value change on some other parameters. As SE5 uses .ini-like file format it isn't the most flexible or pretty-looking, I'd replace those with script function callbacks. Many of the string values are actually keys to other elements/properties/objects defined in other places.

In components.txt we have Quantum torpedo:
Code:
Name                                            := Quantum Torpedo
Description                                     := Torpedo armed with a quantum singularity warhead. 
Picture Number                                  := 165
Maximum Level                                   := 100
Tonnage Space Taken Formula                     := 40
Tonnage Structure Formula                       := 40 + (([%Level%] - 1) * 10)
Cost Minerals Formula                           := 250 + (([%Level%] - 1) * 10)
Cost Organics Formula                           := 0
Cost Radioactives Formula                       := 20 + (([%Level%] - 1) * 2)
Supply Amount Used Formula                      := 10
Ordnance Amount Used Formula                    := 10
Can Be Placed On Vehicle Types                  := Ship, Base, Satellite, Weapon Platform, Drone
Can Be Placed In Ship Sections                  := Inner Hull, Outer Hull
Component Type List                             := Technological
General Group                                   := Weapons
Custom Group                                    := 0
Number Of Requirements                          := 1
Requirements Evaluation Availability            := AND
Requirements Evaluation Allows Placement        := TRUE
Requirements Evaluation Allows Usage            := TRUE
Requirement 1 Description                       := Empire must have at least tech level 1 in Torpedo Weapons.
Requirement 1 Formula                           := Get_Empire_Tech_Level("Torpedo Weapons") >= (1 + ([%Level%] - 1))
Requirement 2 Description                       := Empire must have at least tech level 1 in Quantum Engines.
Requirement 2 Formula                           := Get_Empire_Tech_Level("Quantum Engines") >= (1 + ([%Level%] - 1))
Number Of Abilities                             := 1
Ability 1 Type                                  := Ordnance Storage
Ability 1 Description                           := Provides storage for [%Amount1%] units of ordnance.
Ability 1 Scope                                 := Space Object
Ability 1 Range Formula                         := 0
Ability 1 Amount 1 Formula                      := 50
Ability 1 Amount 2 Formula                      := 0
Weapon Type                                     := Seeking
Weapon Delivery Type                            := Missile
Weapon Target Type List                         := Ship, Base, Planet
Weapon Damage Type Formula                      := "Normal"
Weapon Space At Range Distance Increment        := 10.0
Weapon Space Min Damage At Range                :=    0.0
Weapon Space Max Damage At Range                :=    0.0
Weapon Space To Hit Modifier At Range           :=    0.0
Weapon Space Min Damage Modifier Formula        := (140 + (([%Level%] - 1) * 5)) - (([%Range%] / 10) * 0.00) - iif([%Range%] > Min(180, (([%Level%] - 1) * 20) + 60), 10000, 0)
Weapon Space Max Damage Modifier Formula        := (140 + (([%Level%] - 1) * 5)) - (([%Range%] / 10) * 0.00) - iif([%Range%] > Min(180, (([%Level%] - 1) * 20) + 60), 10000, 0)
Weapon Space To Hit Modifier Formula            := 0 - [%Range%]
Weapon Reload Rate MS Formula                   := 4000
Weapon Display Type                             := Directed Torpedo
Weapon Space Display Effect Name                := Missile 1
Weapon Ground Display Effect Name               := Missile 1
Weapon Explosion Effect Name                    := [Random Specific Type] Weapon Explosion
Weapon Sound Effect Name                        := Quantum Torpedo
Weapon Seeker Speed Formula                     := 0.04
Weapon Seeker Turn Rate                         := 0.01
Weapon Seeker Tonnage Structure Formula         := 30 + (([%Level%] - 1) * 2)
Weapon Seeker Defense Modifier Formula          := 40


In there "Weapon Damage Type Formula" is actually a "pointer" to actual damage type description in DamageTypes.txt. As "normal" is relatively boring I'll show a bit more interesting one:
Code:
Damage Type Name                                := Only Engines
Description                                     := Damage which penetrates shields and armor, and only causes internal damage to engines.
Picture Number                                  := 4
Cannot Penetrate Any Kind Of Shields            := FALSE
Cannot Penetrate Any Kind Of Armor              := FALSE
Number Of Vehicle Types                         := 0
Number of Shield Types                          := 4
Shield Type 1 Name                              := Normal Shields
Shield Type 1 Penetration Percent               := 100
Shield Type 1 Damage Percent                    := 0
Shield Type 2 Name                              := Phased Shields
Shield Type 2 Penetration Percent               := 100
Shield Type 2 Damage Percent                    := 0
Shield Type 3 Name                              := Plasma Shields
Shield Type 3 Penetration Percent               := 100
Shield Type 3 Damage Percent                    := 0
Shield Type 4 Name                              := Null-Space Shields
Shield Type 4 Penetration Percent               := 100
Shield Type 4 Damage Percent                    := 0
Number of Armor Types                           := 5
Armor Type 1 Name                               := Normal Armor
Armor Type 1 Penetration Percent                := 100
Armor Type 1 Damage Percent                     := 0
Armor Type 2 Name                               := Organic Armor
Armor Type 2 Penetration Percent                := 100
Armor Type 2 Damage Percent                     := 0
Armor Type 3 Name                               := Emissive Armor
Armor Type 3 Penetration Percent                := 100
Armor Type 3 Damage Percent                     := 0
Armor Type 4 Name                               := Crystalline Armor
Armor Type 4 Penetration Percent                := 100
Armor Type 4 Damage Percent                     := 0
Armor Type 5 Name                               := Scattering Armor
Armor Type 5 Penetration Percent                := 100
Armor Type 5 Damage Percent                     := 0
Internal Damage Percent                         := 100
Facility Damage Percent                         := 100
Population Amount Killed Per Damage Point       := 0.25
Crew Amount Killed Per Damage Point             := 0
Is Viral Weapon                                 := FALSE
Number Of Special Effects                       := 0
Number Of Requirements                          := 1
Requirements Evaluation Availability            := TRUE
Requirements Evaluation Allows Placement        := TRUE
Requirements Evaluation Allows Usage            := 1
Requirement 1 Description                       := Only destroys components that generate movement.
Requirement 1 Formula                           := Does_Component_Have_Ability("Movement Standard")
Number Of Abilities                             := 0
All the armor and shield names here are also defined in separate files. First ShieldAndArmorLevels.txt defines the actual shields and armors:
Code:
Number Of Shield Levels                       := 4
Shield Level 1 Name                           := Normal Shields
Shield Level 2 Name                           := Phased Shields
Shield Level 3 Name                           := Plasma Shields
Shield Level 4 Name                           := Null-Space Shields

Number Of Armor Levels                        := 5
Armor Level 1 Name                            := Normal Armor
Armor Level 2 Name                            := Organic Armor
Armor Level 3 Name                            := Emissive Armor
Armor Level 4 Name                            := Crystalline Armor
Armor Level 5 Name                            := Scattering Armor

Next we have shield generators in Components.txt. As it's similar to the torpedo I'll just remove the boring parts:
Code:
Name                                            := Phased - Shield Generator
Description                                     := Generator which creates an energy field that cannot be penetrated by phased weapons.
General Group                                   := Shields
Custom Group                                    := 0
Number Of Requirements                          := 1
Requirements Evaluation Availability            := AND
Requirements Evaluation Allows Placement        := TRUE
Requirements Evaluation Allows Usage            := TRUE
Requirement 1 Description                       := Empire must have at least tech level 20 in Shields.
Requirement 1 Formula                           := Get_Empire_Tech_Level("Shields") >= (20 + ([%Level%] - 1))
Number Of Abilities                             := 1
Ability 1 Type                                  := Shield Generation
Ability 1 Description                           := Generates [%Amount2%] phased shield points.
Ability 1 Scope                                 := Space Object
Ability 1 Range Formula                         := 0
Ability 1 Amount 1 Formula                      := "Phased Shields"
Ability 1 Amount 2 Formula                      := 150 + (([%Level%] - 1) * 30)
Weapon Type                                     := None

From there we see it's a shield that's immune to phased weapons, like phased - polaron beam:
Code:
Name                                            := Phased - Polaron Beam
Description                                     := Multi-Phasic energy beam which can penetrate normal shields.
Weapon Type                                     := Direct Fire
Weapon Delivery Type                            := Energy Beam

Weapon Damage Type Formula                      := "Skips Normal Shields"
Weapon Space At Range Distance Increment        := 10.0
Weapon Space Min Damage At Range                :=    0.0
Weapon Space Max Damage At Range                :=    0.0
Weapon Space To Hit Modifier At Range           :=    0.0
Weapon Space Min Damage Modifier Formula        := (28 + (([%Level%] - 1) * 5)) - (([%Range%] / 10) * 8.00) - iif([%Range%] > Min(120, (([%Level%] - 1) * 5) + 40), 10000, 0)
Weapon Space Max Damage Modifier Formula        := (38 + (([%Level%] - 1) * 5)) - (([%Range%] / 10) * 8.00) - iif([%Range%] > Min(120, (([%Level%] - 1) * 5) + 40), 10000, 0)
Weapon Space To Hit Modifier Formula            := 0 - [%Range%]
Weapon Reload Rate MS Formula                   := 2000
Weapon Display Type                             := Beam
Weapon Space Display Effect Name                := Beam 6
Weapon Ground Display Effect Name               := Beam 6
Weapon Explosion Effect Name                    := [Random Specific Type] Weapon Explosion
Weapon Sound Effect Name                        := Phased - Polaron Beam
Weapon Beam Burn Color                          := 242, 221, 0
Weapon Beam Duration                            := 1000
Weapon Beam Speed                               := 0.05


All this allows to define pretty much everything that is in the game. Only a tiny fraction of the values seen here are "magic" with certain pre-defined value/behavior. One of those things are weapon and weapon delivery types like "direct fire" and "energy beam" for the phased-polaron beam.

With a decent hierarchical data file structure it would be possible to make it somewhat less verbose by allowing to define some basic weapon types (missile) and then derieve specific types and only change a few parameters in there.

______________________________________________________

Now question is how exactly combine scripts and text files to make it moddable is a whole different question but I'd most definitely want to see scripting as a possibility to give values in those text files as well. If most of the stuff is defined in code at the moment then extracting it all into external data files won't be an easy task and would push the modding support far into the future so it's probably not feasible to implement all of it but if there is any interest I'll be happy to provide more specific ideas on how those things might be implemented. I probably even wouldn't mind donating some time to actually implement something for modding if you want some extra hands for coding :)

_________________
"Teach a man to reason and he'll think for a lifetime"
- Phil Plait


Last edited by Colin on Tue 24 May, 2011 9:09 am, edited 2 times in total.
Edited for repeated posting.


Top
 Profile  
 
 Post subject: Re: Programmers and Avid Modders! COLLECT HERE!
PostPosted: Wed 25 May, 2011 2:09 am 
Offline
Shortbus
User avatar

Joined: Wed 25 May, 2011 1:53 am
Posts: 9
what about haveing the sounds liek weapons fire etc out in a folder of its own for simple modding... no one hardly does that anymore sounds are useually in .ogg or some type of cab file and such.. dont get me wrong I like the challenge of looking for hours for file types to find something to open them when Id rather mod the sounds for "no offence" better weapon missle etc sounds..... uh btw part of that was being sarcastic.. lol

Got the beta a while ago and thought 2 things.. 1 the name was kinda retarded apart from the abr S.P.A.Z.... but 2 the game and game play was amazing the artwork was astounding and the plot was very creative "the charactor pics wasnt hard to see a bit of photoshop over real pics lol.." kuddos to the guys and or gals of the creation of this game.. (Dont mind my critisizm overall the game for me was a 9 of 10 best 2d game Ive played in ages..)

oh one more thing what about localized componant disableing.. for example haveing a menu where you can target specific parts of a ship to disable the parts to regen over time like hull and shields but at a slightly faster rate untill disabled then it takes way longer.. possible disableable parts.. Weapons beams missle hangers etc.. tractors.. engines.. reactors.. shields life support "kills onboard crew slowly till repaired" and finally cargo "leaks rez out 1 at a time till repaired.." if you think of it tho ejecting rez out when being attack kinda makes a good "flare" so to speek against projectiles and some beams.. .... how about a new part a flare counter measure detonates the missles and some projectiles at a range unlike the small pathetic counter-measure componant currently used.. or something eh what do I know I just like to make things extreamly complicated and more fun to that degree makes ya feel like you can mod ships more lol..

_________________
"Any Clue how to crack one of those huge class cruisers?.."

"And what do you think your doing with my 450-million terawatt subsonic disruptor drill......"

"Oh no no no.... Come back when you have a better idea..."


Last edited by Colin on Wed 25 May, 2011 10:29 am, edited 1 time in total.
Repeat Post


Top
 Profile  
 
 Post subject: Re: Programmers and Avid Modders! COLLECT HERE!
PostPosted: Wed 25 May, 2011 7:43 am 
Offline
Dart

Joined: Fri 25 Feb, 2011 10:18 pm
Posts: 12
IMineUMind wrote:
what about haveing the sounds liek weapons fire etc out in a folder of its own for simple modding... no one hardly does that anymore sounds are useually in .ogg or some type of cab file and such..


.ogg is a perfectly reasonable and normal sound container >-> I don't see the problem with editing those at all, in any capacity. The compressed container might be a bit more of a roadblock for the less technical users, but I don't see a reason not to use a specific open sound container?

You can actually open the current game sound containers (.spz files in your game/data/audio folder) with winrar, so it's probably a normal compression algorithm used in a standard container format. The only issue I can see with modding game sounds at this moment, is that winrar claims the archives have a password. Inside are just plain old .ogg files that shouldn't be all that hard to edit.
Unless I'm missing something, and winrar actually being able to list contents is a fluke due to partially overlapping file formats.


hoho wrote:
If most of the stuff is defined in code at the moment then extracting it all into external data files won't be an easy task and would push the modding support far into the future so it's probably not feasible to implement


Most of this stuff is actually in .cs.dso files in gameScripts, modding in a capacity as you describe would probably be a matter of not precompiling those scripts to allow for editing. If my understanding of the mechanics aren't too far off. And I am interpreting Blorfy's earlier comments correctly.

However there would have to be some form of wrapper system for overrides and possibly conflict detection when mods edit the same file multiple times. Placing modded files in another directory and such. This way the original can remain precompiled and intact, and installing / managing mods becomes a somewhat user friendly experience. Rather than copying files over the ACTUAL game files (oblivion anyone? recovering from a breaking mod was hell in that game if it did more than load an esp file.)


Top
 Profile  
 
 Post subject: Re: Programmers and Avid Modders! COLLECT HERE!
PostPosted: Mon 30 May, 2011 6:09 pm 
Offline
Developer
User avatar

Joined: Fri 25 Feb, 2011 3:39 am
Posts: 1767
This is a good thread, keep it up guys. It will be the starting point when we start putting together the modding tools.

As an answer to the hard coded vs data driven implementation for SPAZ. SPAZ is entirely data driven. Datablocks for just about everything. For example. Here is how the star cruiser is defined for those who are curious about creating ships in the future:

datablock HullDatablock(HullStarCruiser : HullHuge)
{
friendlyName = "Star Cruiser";
imageMapShield = "ship_starCruiser_shieldImageMap";

factionImageMap_Terran = "ship_starCruiserImageMap";
factionImageMap_Pirate = "ship_starCruiser_pirateImageMap";
factionImageMap_Zombie = "ship_starCruiser_zomImageMap";
factionImageMap_Default = "ship_starCruiserImageMap";

hullIconImageMap = "ship_starCruiser_iconImageMap";
purchaseTutorial = "PT_HullStarCruiser";

starLevelUnlock = 4;

rootDesign = "StarCruiserShip";

CollisionPolyList = "-0.079 -0.879 0.064 -0.884 0.280 -0.025 0.108 0.928 -0.128 0.933 -0.309 -0.015";
LinkPoints = "-0.005 0.093 -0.147 -0.879 0.115 -0.884 -0.335 -0.398 0.325 -0.408 -0.005 0.958 -0.372 0.177 0.361 0.172 -0.293 0.113 0.267 0.113 -0.340 0.383 0.320 0.378 -0.005 0.707 -0.236 -0.840 0.220 -0.840 -0.320 -0.123 0.309 -0.133";

hullTurnSpeedMod = $MULT_VERYLOW;
comparativeCargo = $MULT_AVERAGE;
comparativeCrew = $MULT_HIGH;
comparativeHealth = $MULT_HIGH;
comparativeMass = $MULT_HIGH;
RUCost = 1000;
NumBlackBoxes = 6;

engineLinksThrust = "6";
engineLinksRetro = "14 15";
engineLinksClockwise = "16";
engineLinksCClockwise = "17";


externalLinkPoints = "2 3 4 5 7 8 9 10 13";
turretLinkPoints = "11 12";

externalLinkType2 = $LINK_Shooter;
externalLinkSize2 = $SLOT_HUGE;

externalLinkType3 = $LINK_Shooter;
externalLinkSize3 = $SLOT_HUGE;

externalLinkType4 = $LINK_Shooter;
externalLinkSize4 = $SLOT_HUGE;

externalLinkType5 = $LINK_Shooter;
externalLinkSize5 = $SLOT_HUGE;

externalLinkType7 = $LINK_Launcher;
externalLinkSize7 = $SLOT_HUGE;

externalLinkType8 = $LINK_Launcher;
externalLinkSize8 = $SLOT_HUGE;

externalLinkType9 = $LINK_Launcher;
externalLinkSize9 = $SLOT_HUGE;

externalLinkType10 = $LINK_Launcher;
externalLinkSize10 = $SLOT_HUGE;

hullTurretSize11 = $SLOT_SMALL;
hullTurretSize12 = $SLOT_SMALL;

externalLinkType13 = $LINK_Utility;
externalLinkSize13 = $SLOT_MEDIUM;



wreckageData[0] = "ShipWreck_Starcruiser_Top 0 -0.5 0";
wreckageData[1] = "ShipWreck_Starcruiser_Bottom 0 0.5 0";

//doodadLink_Faction# offsetX offsetY rotation isUnderShip creationChance DoodadDatablockOrSet1 ...DoodadDatablockOrSetN
doodadLinkTerran_1 = "-0.157 0.697 0 0 1 DoodadSet_Terran_L_Lights";
doodadLinkTerran_2 = "-0.157 0.791 0 0 1 DoodadSet_Terran_L_Lights";
doodadLinkTerran_3 = "0.136 0.692 0 0 1 DoodadSet_Terran_L_Lights";
doodadLinkTerran_4 = "0.136 0.781 0 0 1 DoodadSet_Terran_L_Lights";
doodadLinkTerran_5 = "-0.010 -0.908 0 0 1 DoodadSet_Terran_L_Lights";
doodadLinkTerran_6 = "-0.183 -0.182 0 0 1 DoodadSet_Terran_S_Radar";
doodadLinkTerran_6 = "0.178 -0.187 0 0 1 DoodadSet_Terran_S_Radar";

doodadLinkPirate_1 = "-0.157 0.697 0 0 1 DoodadSet_Pirate_L_Lights";
doodadLinkPirate_2 = "-0.157 0.791 0 0 1 DoodadSet_Pirate_L_Lights";
doodadLinkPirate_3 = "0.136 0.692 0 0 1 DoodadSet_Pirate_L_Lights";
doodadLinkPirate_4 = "0.136 0.781 0 0 1 DoodadSet_Pirate_L_Lights";
doodadLinkPirate_5 = "-0.010 -0.908 0 0 1 DoodadSet_Pirate_L_Lights";
doodadLinkPirate_6 = "-0.183 -0.182 0 0 1 DoodadSet_Pirate_S_Radar";
doodadLinkPirate_6 = "0.178 -0.187 0 0 1 DoodadSet_Pirate_S_Radar";

doodadLinkZombie_1 = "-0.157 0.697 0 0 1 DoodadSet_Zombie_L_Lights";
doodadLinkZombie_2 = "-0.157 0.791 0 0 1 DoodadSet_Zombie_L_Lights";
doodadLinkZombie_3 = "0.136 0.692 0 0 1 DoodadSet_Zombie_L_Lights";
doodadLinkZombie_4 = "0.136 0.781 0 0 1 DoodadSet_Zombie_L_Lights";
doodadLinkZombie_5 = "-0.010 -0.908 0 0 1 DoodadSet_Zombie_L_Lights";
doodadLinkZombie_6 = "-0.183 -0.182 0 0 1 DoodadSet_Pirate_S_Radar";
doodadLinkZombie_6 = "0.178 -0.187 0 0 1 DoodadSet_Pirate_S_Radar";

//BREACH DATA
breachThresholds["Minor"] = "0.8 0.6 0.4 0.2 0.1";
breachThresholds["Major"] = "0.9 0.7 0.5 0.3 0.1";


//breachLink_# offsetX offsetY rotation BreachSet
breachLinks["Minor", 1] = "-0.162 -0.668 Random BreachSet_Small";
breachLinks["Minor", 2] = "-0.079 -0.732 Random BreachSet_Small";
breachLinks["Minor", 3] = "0.131 -0.678 Random BreachSet_Small";
breachLinks["Minor", 4] = "0.225 -0.098 Random BreachSet_Small";
breachLinks["Minor", 5] = "-0.199 0.403 Random BreachSet_Small";
breachLinks["Minor", 6] = "-0.183 0.545 Random BreachSet_Small";
breachLinks["Minor", 7] = "-0.141 0.845 Random BreachSet_Small";
breachLinks["Minor", 8] = "0.141 0.840 Random BreachSet_Small";

breachLinks["Major", 1] = "-0.031 -0.408 Random BreachSet_Huge_Glass";
breachLinks["Major", 2] = "0.005 0.098 Random BreachSet_Huge_Glass";
breachLinks["Major", 3] = "-0.047 -0.270 Random BreachSet_Small_Glass";
breachLinks["Major", 4] = "0.026 -0.157 Random BreachSet_Small_Glass";
breachLinks["Major", 5] = "-0.026 -0.049 Random BreachSet_Small_Glass";

//egg
embryoInfo[0] = "0.251 0.260 2 ZombieEggBase";

hullTypeXPMult = 1.0;
};


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 34 posts ]  Go to page 1, 2  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group