Hard Light Productions Forums

Hosted Projects - Standalone => Wing Commander Saga => Topic started by: Aginor on April 12, 2012, 09:24:04 am

Title: Saga-Modding
Post by: Aginor on April 12, 2012, 09:24:04 am
Hi there!

Since I had another funny night with the Saga FRED last night I decided to open a thread here.
I want to write about the progress on my missions, ask a few questions that I feel silly to ask in the mission editing forums and talk about Saga-specific FRED things.
Also I want to inspire others to learn FRED to make missions for Saga, and generally improve their skills. Post your ideas here!

Of course I know I am still a beginner with FRED, so feel free to correct anything wrong I write or suggest cool things I could do in FRED.


Soo... let's get started.

Last night and the day before I had some time and started to create a mission.

A small base (Saga supply depot ) near a jump point is the base. The player starts there, flying an Arrow.
The briefing tells him a convoy is going to jump out, and he should scan all the transports to make sure there are no smugglers hiding in the convoy.
So the player starts and there are eight friendly transports of various sizes in space (Artemis, Pelileu, Clarkson, Shuttle), all of them heading for the jump point, initial orders are given to follow three routes to the jump point. Some of them have 1-2 escorting Razor-class fighters. (I formed them to wings, the transport being the wing leader) All are scannable and have cargo and subspace drive.
Their depart cue is when they are less than 1000m from the jump buoy. The escorts jump out simultaneously with their wing leaders.
There are two evil ship captains, a Demon with drugs as cargo and a Clarkson with slaves. Both attack some seconds after being scanned (I set it to 5 for now). The player has to kill the escorts. The Demon has also to be killed but the Clarkson with the slaves is to be disarmed, which triggers a chain of events that set the transport to friendly again and it docks at the station.
If the objectives are reached or impossible to reach (for example if the player destroyed the slave transport) the player is ordered to land. Mission end occurs when Alpha 1 is closer than 30m to the fighterbay.

I also did three different debriefings depending on whether the objectives were reached or not and played a bit with backgrounds.

So that's what I did. It took me approximately 5 hours.
Funniest thing to happen: I forgot to disable the other AI goals for the slave transport when I told it to dock. So it docked.... and then flew to the jump point carrying my station away!! I LOL'd very hard. Then I set it to "play dead" as soon as it had docked via a chained event.

I encountered a few strange things I don't understand (maybe someone here knows the answers):
- Something caused my station to become some sort of ghost without collision detection as soon as some event was activated. I can't reproduce it now though but it happened before.
- My sound seems to disappear and reappear sometimes during the mission. I think it happened when I added the Razors to my mission. It is not the whole sound I think but only some sounds, I don't know what causes it or how to fix it.
- One of the Razors had a Kilrathi deathscream once. I deactivated deathscreams now. I found no pirate persona :(


Questions:
1. Is it possible to have more than one effect in an event?
Something like:
When the cargo is known for more than 5 seconds:
 - wing pirates1: set iff to hostile
 - wing pirates1: add ai goal attack Alpha1
I did this with a event chain, the second event being true as soon as it is activated. Is there a better way?

2. I am a software developer so I am used to some constructs which I couldn't find in FRED, so maybe someone can answer those questions:
2a. Is there something like an IN-operator in FRED, so I can put ships that belong to different wings in arrays ?
For example in my mission I have an event "all_scanned" that becomes true when all transports are scanned. I used ten "and"s for that so I could include all the transports that shouldn't escape un-scanned. Is there a better way?

2b. Is there an operator in FRED to reference the object itself or one of its attributes, like "this.shipname", so I can use the same event on several ships? In my mission all ships have the same depart cue, just the ship name is changed every time.

3. Which methods are used if I want to do the following;
Don't allow the player to shoot at the ship with the drugs before it becomes hostile. So I have to trigger an event when the player hits a friendly ship. But of course one hit against a transport during a fight with the pirates is likely to happen so the event shouldn't fire instantly.

4. A design question:
Should I use complex expressions for mission goals or is it better to do the complex things in events and reference to the events in the objectives screen.

5. Something completely different: Can someone point me to a tutorial where I can learn to include new ships into Saga? I'll need a flyable Dralthi and/or Darket soon.
Title: Re: Saga-Modding
Post by: General Battuta on April 12, 2012, 09:35:37 am
Quote
Questions:
1. Is it possible to have more than one effect in an event?
Something like:
When the cargo is known for more than 5 seconds:
 - wing pirates1: set iff to hostile
 - wing pirates1: add ai goal attack Alpha1

Right click on the event and use 'add operator', don't accidentally click 'delete'
Title: Re: Saga-Modding
Post by: karajorma on April 12, 2012, 10:34:13 am
2. I am a software developer so I am used to some constructs which I couldn't find in FRED, so maybe someone can answer those questions:
2a. Is there something like an IN-operator in FRED, so I can put ships that belong to different wings in arrays ?
For example in my mission I have an event "all_scanned" that becomes true when all transports are scanned. I used ten "and"s for that so I could include all the transports that shouldn't escape un-scanned. Is there a better way?

2b. Is there an operator in FRED to reference the object itself or one of its attributes, like "this.shipname", so I can use the same event on several ships? In my mission all ships have the same depart cue, just the ship name is changed every time.

Both of these sound like something that would be improved by using the when-argument SEXP instead of when. Check my FAQ's FREDding section for more information on how to use it.

Quote
3. Which methods are used if I want to do the following;
Don't allow the player to shoot at the ship with the drugs before it becomes hostile. So I have to trigger an event when the player hits a friendly ship. But of course one hit against a transport during a fight with the pirates is likely to happen so the event shouldn't fire instantly.

Depending on whether it was added before or after the fork, use the damage-caused SEXP if you have it.

Quote
4. A design question:
Should I use complex expressions for mission goals or is it better to do the complex things in events and reference to the events in the objectives screen.

I personally like to do everything in the event editor and simply use is-event-true-delay everywhere else. Other FREDders prefer to do things differently. It's pretty much a personal choice. Just be consistent once you choose.

Quote
5. Something completely different: Can someone point me to a tutorial where I can learn to include new ships into Saga? I'll need a flyable Dralthi and/or Darket soon.

Do you need to add new ships? The "player_ship" flag might be all that is required. I'll leave an explanation of that to someone who is a better modder than me though.
Title: Re: Saga-Modding
Post by: Dragon on April 12, 2012, 10:47:08 am
For the Klirathi ships, you'd need to add weapon configuration (allowed missiles and guns) and the "player_ship" flag. Maybe some loadout screen descriptions. That should be it.
Title: Re: Saga-Modding
Post by: Aginor on April 12, 2012, 01:24:44 pm
Wow, three useful answer posts already, thanks a lot!

Let's see...

@General B: I just realized I was just clicking on the wrong spot all the time when I tried that. I have to click on the "when" to add an operator, not on the existing effect below it. Check!

@Karajorma:
2. I'll check out your FAQ today, maybe I'll also get seom inspiration for my next mission.
3. get_damage_caused is available it seems, so this may be useful.
4. Ok, I guess your approach is also the way I'll do it. Especially since in the event editor there are descriptions of the SEXPs which aren't there in the objective editor.
5. Ok, that's a start.

@Dragon:
ok... now there's the problem that I don't even know where to find the place to do what you said. I understand there are some "ship tables" somewhere but I can't find them. Are they stored somewhere in the .vp files, and can I overwrite them by putting new tables into some folder or do I have to change them where they are? I'm not new to modding but to FS2 modding so please forgive me if those are noobish questions.
I guess I'll look into the Data Structure page of the wiki.  http://www.hard-light.net/wiki/index.php/FS2_Data_Structure

I'll be back in a few minutes :)
Title: Re: Saga-Modding
Post by: Dragon on April 12, 2012, 01:32:28 pm
They tables is in hermes_core.vp . You need to extract ships.tbl to [saga directory]/mod/modname/data/tables (that's how it works in WCS). You might be better off making a modular table altering only those lines. PM me if you need additional help, but it's pretty much basic FSO modding, look at the wiki for tutorials. If you won't be able to figure it out, I can even do that for you.
Title: Re: Saga-Modding
Post by: Aginor on April 12, 2012, 02:05:18 pm
Thanks Dragon, I'll take a look at that.

@Karajorma: I suppose you hear that all the time, but.. MAN! That FAQ of yours really rocks! Very helpful.

Right now I'm digging into the files :)
Title: Re: Saga-Modding
Post by: Aginor on April 12, 2012, 02:58:01 pm
Ok, I extracted the ships.tbl and added the "player_ship" flag for the Darket.
I created a folder [saga directory]/mod/Aginors_mod/data/tables and put the ships.tbl in there.

I also created a mod.ini in the mod's main folder.

I read that FRED uses the mod selected in the launcher but I can't select the mod in the launcher.
Of course this is the Saga launcher so the normal way to select a mod may not be possible...

Worst case will be that I have to wait for the Saga SDK, Keldor and Tolwyn will surely explain this so no problem if no one knows what I have to do now, but if you already know what to do, please tell me :)


I also tried a few things you guys told me, and I'm sure I can optimize future missions that way. If I just had more time and ideas for cool missions... :D
Title: Re: Saga-Modding
Post by: Dragon on April 12, 2012, 03:44:16 pm
Don't bother with a mod.ini
Select the mod in Saga launcher by choosing it with arrows.
Also, I've made a small mistake. The folder actually is [saga directory]/mods.
Title: Re: Saga-Modding
Post by: Aginor on April 12, 2012, 03:55:20 pm
Yeah that worked, I can select the mod now. Thanks!
Title: Re: Saga-Modding
Post by: Light on April 12, 2012, 06:44:18 pm
If you want to fly the Kilrathi fighters take a look at the .tbm files that I have attached. I set them up while beta testing.

[attachment deleted by a ninja]
Title: Re: Saga-Modding
Post by: Aginor on April 13, 2012, 04:46:39 am
@Light: Thanks, that saves me a lot of time. I made the Darket flyable yesterday. First the weapons didn't work but then I realized that the Stalker missile wasn't usable by the player. I changed it and could use the missiles, but I don't know if the table changes affect the AI or something.

I just looked into your tables and they look much better than mine. I'll include them in my mod (and if I ever release it I'll mention you in the credits)


btw: Flying the Darket last night I realized that being a evil Kilrathi attacking transports can be great fun. I can start doing some of the more simple missions for my mod now, as soon as I understand the Saga autopilot template and can change everything to Kilrathi.
Title: Re: Saga-Modding
Post by: Aginor on April 14, 2012, 06:29:48 am
Ok, here's another question, this time about animations:
Saga uses ani files to show the weapons in the loadout screen.
Since there are no such files for the Kilrathi missiles I'm now in the process of creating these.
I already created an ani file for the Claw missile, and I changed the Claw's entry in the weapons table to $Anim: LoadoutClaw
The LoadoutClaw.ani I put into the folder /data/interface of my mod's directory.

But the ani doesn't show up in the loadout screen. Now I don't know if I did something wrong creating the ani or if I just put the ani in the wrong folder or something. The ani looks good in AniView.
Any ideas on that?


EDIT: Nevermind, the file name has to be 2_LoadoutClaw.ani for some reason. I noticed that the files in the Saga VPs are all called like that.
Its working now.  :)

EDIT2: ok, Loadout anis for all Kilrathi missiles are done. Since I'm not able to make better fitting icons I'll use those of the Terran missiles for now. Maybe I will change that in the future but that is low priority.

Next I will try to create a nice Kilrathi loading screen and then I'm back to FREDing :)
Title: Re: Saga-Modding
Post by: karajorma on April 14, 2012, 08:20:45 am
2_LoadoutClaw.ani = images used for 1024x768 and up. 640x480 will use the LoadoutClaw.ani
Title: Re: Saga-Modding
Post by: Aginor on April 14, 2012, 10:43:57 am
Ah, thanks!
I already wondered what all the 2_* meant  :)

My next problem is linked to interface files as well:
I did a new progress bar (2_Loading.ani) that works, but then I made the background (took the Saga 2_Loading_BG.dds and edited it) and it seems to be completely transparent. Ingame I can see the progress bar ani but not the background.
I already tried different DDS methods (DXT1,3 and 5) but neither worked. So what did I do wrong?

EDIT:
Aaand again I asked a few seconds too early. I looked at the filesize of the Saga DDS files and noticed they are much bigger than mine. So now I tried to use none of the methods mentioned above but uncompressed DDS and it works.
Title: Re: Saga-Modding
Post by: Aginor on April 16, 2012, 04:49:50 am
Here's another update.
I wanted to FRED a bit, but then I just had to do something else: I changed some interface screens to a Kilrathi design. Since I was the one who created or at least worked on most of those for Saga I knew what to do (and more important: what to avoid). Now I have almost all used interface screens finished. I think four or five are missing that I know of. It does add a cool Kilrathi mood to the game. I will post some screenshots when I'm home.

... hmmm, now that I think about it... basically I have a half finished Kilrathi mod without missions.
I even think about splitting my work in two:

One package would be the Kilrathi mod, including
- all interface screens Kilrathi style
- Default Kilrathi wingman, hopefully including voices
- Saga autopilot template with Kilrathi ships and using Kilrathi personas, so everyone can make their own Kilrathi campaign.

The other one will be my Kilrathi campaign. I may need some help or at least ideas for that. What I already have and what I need:
- rough story draft (I'll need somebody who is a writer so I can send him my draft, I need ideas)
- basic mission structure, with objectives, nav points and such things for the planned 10 missions. (I will FRED those myself if I can, but I'll need people who know FRED and FSO so they can do some QA )

I also looked if I can do a mainhall for the mod and I think I can't. I'm neither creative enough to design it nor do my modeling skills suffice for creating it. I will ask some artists for sketches of a Kilrathi main hall though, and if I get some I will try to model and render and include that stuff. This is low priority though, so I guess there will be a non-animated main screen in the first version, I can do that one myself.

My last request for now is sound-related:
Does anyone know a program or a plugin for audacity or something that I can use to transform normal voices into Kilrathi-sounding voices?
I also need a "computer voice" (robot-like) since the friendly Saga one is unsuitable for Kilrathi I think. I think I will record at least some of the voices myself but I have to change my voice for that, I don't sound Kilrathi enough.

So this is the state of my modding, stay tuned for more!  :)
Title: Re: Saga-Modding
Post by: Aginor on April 16, 2012, 01:50:36 pm
Here is one of the promised pictures of the screens. Still WIP of course but most of them suffice I think. I have to get back to FREDing soon after all.
...actually it looks much better ingame (this is just a jpg i made of the DDS). Whatever.^^

I think I finished the screens now. (I just found two that were missing before).
Next I'll get back to FREDing and then maybe I'll do some medals and rank insignia (I also did that before for Saga, unfortunately my medals weren't used. I'll have to do some research though to see how Kilrathi medals may look like)

btw: If anyone has a cool idea how a Kilrathi main hall may look like feel free to post some concept art, then I'll see what I can do with that.
EDIT: same goes for Kilrathi HUD parts and medals/rank insignia of course.

[attachment deleted by ninja]
Title: Re: Saga-Modding
Post by: Deathsnake on April 16, 2012, 02:22:49 pm
That looks nice. Well done.
Title: Re: Saga-Modding
Post by: FekLeyrTarg on April 16, 2012, 02:24:51 pm
I agree with Deathsnake.
Title: Re: Saga-Modding
Post by: Aginor on April 16, 2012, 02:41:59 pm
Thanks a lot!
That one actually took quite long because I had to separate everything into six layers or so.
(Bonus points if anyone finds out what the signs mean. It is possible if you use the world's biggest information source)

Also here's another screen (Ship selection). As you see the structure is completely the same since those positions are fixed in the code, I just manipulated some colors and stuff.

[attachment deleted by ninja]
Title: Re: Saga-Modding
Post by: Talon 1024 on April 16, 2012, 02:53:02 pm
This is my attempt at a Kilrathi mainhall...  I did it a long time ago for WCHF, but I'm planning on reworking it to fit the Kilrathi architecture as described in Victory Streak.
(http://www.ciinet.org/kevin/myimages/landreich/KilrathiMainhall.png)
Title: Re: Saga-Modding
Post by: Aginor on April 16, 2012, 04:16:39 pm
It looks a bit empty, but I like the floor and the red lights as well as the tubes on the ceiling.
Is this supposed to be on a base or on a space ship? I think it looks more like a base, especially the walls.
Thanks for posting this!

On other news: I finally found the time to FRED a bit and completed the autopilot tutorial. That thing sure is complex, but now I think I understand most of it. I'll FRED some additinal simple missions and then move on to create the first missions for my campaign.
Title: Re: Saga-Modding
Post by: Aginor on April 18, 2012, 03:34:29 am
Just a little update:
Yesterday I managed to create my first two small missions based on the autopilot template without using Tolwyn's walkthrough. So I'm making a bit of progress in learning FRED, so I can do some missions soon.

Story is still a very rough draft but I think about it all the time, focusing on the parts that are told in the missions of course.

And here's another question about the interface:
Where in the configuration files can I find the font color for the menus?
I want to experiment with that because I think the blue color doesn't fit too well into the orange/red/brownish color scheme of the Kilrathi. I need to experiment and find something that is easily readable and still fits.
But I only found font files referenced in the font table. Where is the color? Is it in the font files? If yes: How can I edit them?
Title: Re: Saga-Modding
Post by: The E on April 18, 2012, 03:38:56 am
The font colour in menus is hardcoded (at least it is that way in FSO; if the Saga team has changed this, please disregard this message).
Title: Re: Saga-Modding
Post by: Aginor on April 18, 2012, 03:48:21 am
Damn.
Thanks for the info, E.

I mean, IMO the blue font doesn't look too bad in my menu screens, but it doesn't look too good either so if it had been easy to change it I would have done it.
Title: Re: Saga-Modding
Post by: Aginor on April 19, 2012, 08:35:58 am
Ok, here's another question:
In one of my missions the following is planned to happen:

The player reaches a nav point, sees some guys do something and they notice he is there a few seconds later. A fight starts and everyone is shooting around etc.
No problem yet.
After some of them are shot down the enemy realizes they will lose, so they decide to run for it. They are supposed to hit their afterburners and fly in a certain direction (into an asteroid field) where they will hide (actually they will vanish, I just have to make sure the player is not there when they do it.) Others will stay behind and fight.

So I have to clear their AI goals, add a waypoints_once goal to fly towards the new location, and then I have to tell them to fly maximum afterburner speed but I don't know a SEXP for that purpose. How can I do that?

The rest should be easy: If they arrive at the planned departure location and the player is more than 4000m away they vanish. If the player is there they will fight (add_goal to fight Alpha again) but the mission objective fails (he is ordered to let them get away when the fight begins)
Title: Re: Saga-Modding
Post by: General Battuta on April 19, 2012, 08:53:23 am
You can't force them to use their afterburners, to my knowledge. You'll have to disable dynamic goals and give them an attack order on a distant ship hostile to them. That or modify a table file.
Title: Re: Saga-Modding
Post by: Aginor on April 19, 2012, 09:52:42 am
Hmm.... I could set a friendly (so it is hostile for the enemy) unit that is invisible to the player's sensors (but not for them, is that possible?) behind the asteroid field and let them attack it, so they would try to reach it with afterburners....

Good idea, I'll try that tonight.
Title: Re: Saga-Modding
Post by: Aginor on April 20, 2012, 03:16:44 pm
Ok, here's another question, this time concerning ani files:
I' working on some HUDs now but my problem is that when I create an ani file (even if I export an existing one and re-create the ani with AniBuilder) it seems to become completely transparent.
What am I doing wrong?



EDIT: If you want to help me designing the HUDs, please look at this thread at the CIC, I posted the existing confed HUDs there. I'll need Kilrathi-looking ones for the following ships. I'm happy about any sketches, regardless of how they look like. I'm not very creative unfortunately.
- Darket
- Dralthi
- Vaktoth
- Gothri
- Paktahn
- Khahaf
- Ekapshi
- Sorthak
- Bloodfang

http://www.wcnews.com/chatzone/threads/kilrathi-hud-concepts.26091/


Also I'm a bit ashamed that I post almost the same things in three different forums (here, CIC and Wingcenter) but there aren't many wingnuts out there so I have to spread my Threads a bit in order to get any attention and hopefully help.
Title: Re: Saga-Modding
Post by: Aginor on April 21, 2012, 04:25:08 pm
Meanwhile I'm back to FRED.
My mission now works completely as intended except the afterburner thing mentioned above.

The method General Battuta mentioned doesn't seem to work. The ship still doesn't use its afterburners. :(

But you also said something about tables. How does that work?
Title: Re: Saga-Modding
Post by: Deathsnake on April 21, 2012, 05:22:30 pm
Ok, here's another question:
In one of my missions the following is planned to happen:

The player reaches a nav point, sees some guys do something and they notice he is there a few seconds later. A fight starts and everyone is shooting around etc.
No problem yet.
After some of them are shot down the enemy realizes they will lose, so they decide to run for it. They are supposed to hit their afterburners and fly in a certain direction (into an asteroid field) where they will hide (actually they will vanish, I just have to make sure the player is not there when they do it.) Others will stay behind and fight.

So I have to clear their AI goals, add a waypoints_once goal to fly towards the new location, and then I have to tell them to fly maximum afterburner speed but I don't know a SEXP for that purpose. How can I do that?

The rest should be easy: If they arrive at the planned departure location and the player is more than 4000m away they vanish. If the player is there they will fight (add_goal to fight Alpha again) but the mission objective fails (he is ordered to let them get away when the fight begins)

You make a navpoint for those fighters far away
and in the Events:

Running
- when Fighterwing X-ray
   -destroyed 50 %
- add goal
 fighterwing X-ray
 ai chace
 - Waypoint retreat

That should work.
Title: Re: Saga-Modding
Post by: Aginor on April 21, 2012, 06:55:39 pm
Thanks! That's detailed enough, even for me :D

I did it almost exactly like that, but it didn't work.
I'll try again tomorrow, maybe I just made some small mistake.
Title: Re: Saga-Modding
Post by: Tolwyn on April 22, 2012, 01:21:56 am
depending on the situation, ai-stay-near might work for you too.
Title: Re: Saga-Modding
Post by: Aginor on April 22, 2012, 06:15:38 am
I'll try that, thanks!
I just booted up my PC for further mission work. :D
But the weekends are just too short if you want to get something done. I wish I was unemployed.  ...ahhh...no, not really.
Title: Re: Saga-Modding
Post by: Aginor on April 23, 2012, 05:00:22 am
I'm back! And my questions are becoming increasingly difficult. But I'm sure you can handle that.

I am now able to let ships escape on command, but I noticed some weird effects I don't understand with that and I have a new problem.
Weird effects:
- When I add the goal to stay-near-ship with the ghost and then try to remove it, it doesn't happen. clear-goals works, removing a single goal doesn't. Are there any tips on how to use ai-remove-goal?
I solved the problem like this: I created an event "resume mission" as a copy of the "AI orders" event for this nav point and I call it every time the event that caused the retreat is true X seconds ago. Works so far, I use a variable (at least a ...sort of, see below) to build some sort of state machine so it doesn't fire all the time.

- how do I read variables? I found how to set them, but I can't find how to read them. That's the reason why I became... creative. I used the "is-cargo-known", "set-scanned" and "set-unscanned" SEXPs to use the scanned-flag of my ghost object as a boolean variable that I can set and read with events. Of course thats not good style so I'd like to know how I can use variables.

- every-time-argument seems to have a problem with AND, or the distance SEXP doesn't work as I think it does. My pictures show the example. The first one is working, the second one isn't.


So you might wonder what I'm actually trying to do. The answer is the following:
Saga does have pretty lethal capship explosions, and in some of my missions the player and his wingman are flying Darket light fighters. They will die every time they or somebody else in their vicinity blow a capship up.
Saga solved this problem by guarding almost all wingmen, so they couldn't die at all. In my campaign I don't want to to this since wingmen will be a bot more dispensable expendable than in the Saga main campaign. So they should be able die, but not because of capship explosions.
I thought about making them invincible for a few seconds every time a capship blows up, but I didn't like that much either.

So then I thought: Ok, why don't they just flee for a few seconds in some direction while the cap blows up, using their afterburners.
It took a while until I could script that but it worked and looks good. I told them to send a message every time they move away ("This ship will blow up, retreat and regroup!" and when they turn around and come back for their next attack ("resume mission").

And indeed everything works now, just by inserting two events with arguments for the capships for each wing that should flee from explosions. ....Except a few small things.
I want that they only flee if the capship is really near them. They are not supposed to flee if they are not close to the exploding capship. They do that now and I thought I could fix by just adding an AND. That seems to break the whole event though, and I'm not sure why.


[attachment deleted by a ninja]
Title: Re: Saga-Modding
Post by: karajorma on April 23, 2012, 11:57:53 pm
- When I add the goal to stay-near-ship with the ghost and then try to remove it, it doesn't happen. clear-goals works, removing a single goal doesn't. Are there any tips on how to use ai-remove-goal?

I'm not certain how ai-remove-goal works to be honest. It's an SCP addition IIRC and so as a result if it's not been used it may still have bugs. Might be worth testing with a much more basic test mission to see how the SEXP works.

Quote
- how do I read variables? I found how to set them, but I can't find how to read them. That's the reason why I became... creative. I used the "is-cargo-known", "set-scanned" and "set-unscanned" SEXPs to use the scanned-flag of my ghost object as a boolean variable that I can set and read with events. Of course thats not good style so I'd like to know how I can use variables.

My FAQ has a detailed explanation on how to use variables but basically you just replace a number or string with a variable. So

is-cargo-known
-Red 1

becomes

is-cargo-known
-ShipI'mInterestedIn[Red 1]

Quote
- every-time-argument seems to have a problem with AND, or the distance SEXP doesn't work as I think it does. My pictures show the example. The first one is working, the second one isn't.


So you might wonder what I'm actually trying to do. The answer is the following:
Saga does have pretty lethal capship explosions, and in some of my missions the player and his wingman are flying Darket light fighters. They will die every time they or somebody else in their vicinity blow a capship up.
Saga solved this problem by guarding almost all wingmen, so they couldn't die at all. In my campaign I don't want to to this since wingmen will be a bot more dispensable expendable than in the Saga main campaign. So they should be able die, but not because of capship explosions.
I thought about making them invincible for a few seconds every time a capship blows up, but I didn't like that much either.

So then I thought: Ok, why don't they just flee for a few seconds in some direction while the cap blows up, using their afterburners.
It took a while until I could script that but it worked and looks good. I told them to send a message every time they move away ("This ship will blow up, retreat and regroup!" and when they turn around and come back for their next attack ("resume mission").

And indeed everything works now, just by inserting two events with arguments for the capships for each wing that should flee from explosions. ....Except a few small things.
I want that they only flee if the capship is really near them. They are not supposed to flee if they are not close to the exploding capship. They do that now and I thought I could fix by just adding an AND. That seems to break the whole event though, and I'm not sure why.


Ummmm. Why are you using every-time-argument in the first place? A when-argument with a trigger count of 2 is a better idea.

Your problem with using the distance SEXP is pretty simple though. Once the ship is destroyed you can't test if it is near anything since as far as the game is concerned, it's been destroyed.
Title: Re: Saga-Modding
Post by: Aginor on April 24, 2012, 03:15:32 am
..... ok,I feel reeally stupid now.
The thought that the ship wasn't there anymore didn't occur to me because I can still see it for some seconds and everything. But of course it is destroyed and thus not available anymore. I even used that event to trigger my actions...

Concerning the variables: Ok, then maybe I just did something wrong. When I tried what you just wrote about using variables I crashed FRED. I figured that something in your FAQ might be wrong in this version and that I have to use variables differently. So this is not the case. Which is good of course.

Concerning the remove-goals: I tried that, but I couldn't figure out what really will happen in which case, so I reverted to using clear-goals and adding the other ones after that.

EDIT: As for the every-time thing: I want that event to occur every time one of those capships blows up. I admit I haven't used the trigger count thing yet. But now that you mention it I agree that it might be better. Of course I have to adjust the trigger count for every ship added to the list but that shouldn't be much of a problem. I thought using every-time would be better because I don't have to set the number.
The goal is to have a small number of events (two or three would be cool) in the end that I can copy to any mission, change the capship list and/or the list of wings that should avoid capship explosions, and add a stealth ghost or something as a retreat point.



Thanks for your help!


In other news: My first mission is almost completed (needs a bit of polishing and of course voices) so I moved on to the second one last night.
And it seems I have to refine some parts of my basic structure, because at the moment the mission is either totally boring or ridiculously hard, depending on some small settings. Either way it is not satisfying. Today I will make some changes in the script and see what they will play like. :)
Title: Re: Saga-Modding
Post by: karajorma on April 24, 2012, 07:58:49 am
EDIT: As for the every-time thing: I want that event to occur every time one of those capships blows up. I admit I haven't used the trigger count thing yet. But now that you mention it I agree that it might be better. Of course I have to adjust the trigger count for every ship added to the list but that shouldn't be much of a problem. I thought using every-time would be better because I don't have to set the number.

Every-time is a very specialised operator which shouldn't be used as a cheap substitute for simply using a repeat count/trigger count. You definitely don't need to check for something like this every single frame (which every-time does). Checking once a second is definitely a much better idea and using repeats/triggers can allow you to define how often checks are made.
Title: Re: Saga-Modding
Post by: Aginor on April 24, 2012, 08:11:50 am
Being a software developer I couldn't agree more. That is just a waste of ressources!
I guess I did not read the "every frikkin' frame!"-part in the manual. I had the impression that it was the only way to have an event fired as often as needed instead of just once.
Title: Re: Saga-Modding
Post by: Aginor on April 24, 2012, 05:37:39 pm
Ok, I think I don't understand how "repeat count", "trigger count" and the associated time work together.
Is there some detailed manual with examples about those somewhere? I couldn't find it yet, but I'm tired so I might have missed it.

EDIT: To clarify: I want an event that becomes true based on various things like distance to an object and damage status of another one.
And then a timer starts, counts to 15 seconds, and the next event happens. When that event is finished it is possible that the first event is triggered again and so on. What is the usual way to do this?

EDIT2: And of course I already used variables to make sure the events don't fire again all the time so the counter doesn't reset all the time before it reaches 15 sec.
Title: Re: Saga-Modding
Post by: karajorma on April 24, 2012, 06:24:23 pm
http://www.hard-light.net/forums/index.php?topic=66502.msg1313166#msg1313166

That should explain the difference.
Title: Re: Saga-Modding
Post by: Aginor on April 25, 2012, 04:56:43 am
Ah, thanks a lot.
Perfect answer, as always.
I'm not sure why I couldn't find it in the wiki yesterday, but whatever, now it is bookmarked :) .
Title: Re: Saga-Modding
Post by: Aginor on April 26, 2012, 05:44:52 am
I'm back!
I solved my problem on a completely different way, since the solution I had before worked for one wing, but had problems when other wings were involved.

Now I have three events:
- One tracks which capship is nearest to Alpha and saves its name in a variable.
- Two watches if a ship on the list is destroyed and compares it with the name in the variable. If they are identical Alpha runs away. It also creates a second variable for keeping the name of the exploded ship.
- Three notices when Alpha runs away based on yet another variable and resets the variables and the goals for Alpha after 15 seconds.

Result:
I have a moderately easy to use method to make ships run from capship explosions. I just have to change one ship list.
There are still some small issues (for example if Alpha attacks two different ships in the list at once) I need to sort out but for most of my missions I should be good to go. Also I will need a bit of tweaking with the distances for deciding whether Alpha is indeed near a capship.

Originally I wanted to change the event so that it works for every wing but that would be too complex I think. So at the moment I have to add those three events for every wing that is supposed to run away from capship explosions.

*****

Now I'm back to FREDing missions for my campaign. Mission 2 progresses nicely, I think I will finish the first draft today or tomorrow so I can move on.
Also the story grows and becomes more detailed. I'll not write a book and I'll keep the fluff texts out of the missions so that the amount of story doesn't have an impact on the gameplay that much) but I want to have some flesh on the bones and I'm making progress in that direction, too.

I'm still looking for HUD art and main hall ideas, so If anybody wants to help me with that please send me a pm or post in this thread.
Title: Re: Saga-Modding
Post by: Aginor on April 27, 2012, 06:51:19 pm
Ok, next thing (it seems I won't stop anytime soon :D )

After completing my second mission so far I went back to the HUDs.
After some problems with the palette I now created a central HUD part for my Darket. Looks ok so far but I noticed some things:

The reticle is not in the middle. No problem since I found out how to move the central reticle ani for each ship separately. Looks ok, it is barely visible that it is not really in the middle.
But unfortunately the other gauges show it. The "speed arc" thingie is not the problem, it fits nicely, but the small gauge in the center that shows the shields and hull of the target is a bit of a problem. The same applies to the autopilot gauge.

I know I can move the autopilot gauge around by manipulating the standard values for its position, but how is the syntax for doing this for just one ship? Is that even possible? (I think the gauges code was changed by Saga but I don't know what is possible and what is not.)
If I can't move the autopilot gauge for each ship I will move it to a position where it looks better, somewhere on the left side probably.

I don't know about the other mentioned gauge though, I didn't see anything about it in the hud_gauges tbl.
Title: Re: Saga-Modding
Post by: Aginor on April 28, 2012, 06:20:39 am
I figured out some way to move the autopilot gauge for each ship individually in the hud_gauges.tbl
It is kinda strange though and it actually might break something.

Here it is:


    $Ship:                              Darket
        $Default:                       (1024 768)
       $Gauge:                     Hardpoints
                $HP_Silhouette:         (0 0)
                    +Image:             hp_sil_darket
                $HP_PBank1_L:           (72 27)
                $HP_PBank1_R:           (80 27)
                $HP_SBank1:             (65 52)
       $Gauge:         thisisadummy
      $Autopilot:      (495 233)

I added the last two lines. If I write anything that really exists behind $Gauge it doesn't work (the game complains on startup). If I write a dummy text it does work. I figured that out by playing with the file and accidentally spelling something wrong.

I tried to find out whether it breaks something but all HUD-related things still seem to work for all ships.


My next question is: What's the name of the small "hull percentage and shields" - thingie in the middle of the HUD? I want to try and move that as well.
Title: Re: Saga-Modding
Post by: Aginor on May 01, 2012, 12:58:36 pm
While I work on the problem stated above and my next mission I also have a request for you:
If you are in the mood for it try to create a set of generic wingman lines for a Kilrathi pilot.

Here is the template in case you forgot:

1) "All fighters are destroyed, area is secure"
2) "Enemy fighters have arrived"
3) "I'm attacking your target"
4) "We're the backup and we've arrived to save your ass"
5) "Bravo Wing here, we've just arrived"
6) "There's a fighter on your six!"
7) "I'm dying!"
8) "Charlie Wing here, we've just arrived"
9) "I'm getting the **** out of here"
10) "I'm disabling your target" (going for engines)
11) "I'm disarming your target" (going for turrets)
12) "I'm breaking formation to engage enemy"
13) "Delta Wing here, we've just arrived"
14) "Echo Wing has arrived"
15) "I'm taking damage"
16) "I'm ignoring your target"
17) "I'm not following your order"
18) "I can't pick up your target on sensors"
19) "You just fired on me, man"
20) "Main player has been killed!"
21) "Main player just did something cool!"
22) "I'm out of missiles!"
23) "My fighter is heavily damaged"
24) "Main player is straying away from objective"
25) "Main player is traitor, off with his head!"
26) "I'm following your order"
27) "I'm the greatest!"


That's it for now. :)
Title: Re: Saga-Modding
Post by: Deathsnake on May 02, 2012, 11:06:25 am
Sorry to put that in your thread but a question - I've made the Intro of Enigma and the first mission with the first models I needed. Now I put the rest of the Enigmaships into the modding directory and... only 15 are there. Why I cannot use the other 30 ? Oo

Need big big help here ._.
Title: Re: Saga-Modding
Post by: The_Force on May 02, 2012, 11:55:29 am
Are they in tabel or tbm format?
Title: Re: Saga-Modding
Post by: Deathsnake on May 02, 2012, 12:02:08 pm
tbm. I also had the same problem in the Beta with the Scooby models. In the prologue np. There I already use over 200 models and no problem :(
Title: Re: Saga-Modding
Post by: sleeper286 on May 02, 2012, 12:05:05 pm
Do you use several tbm's for the ships?
I had the same issue and the solution was to put the content of all tbm's in a single tbm file.

In fact, of the gauge.tbm (*-hdg.tbm) saga will just use one single file. Anyone more is getting ignored :/
Title: Re: Saga-Modding
Post by: The_Force on May 02, 2012, 12:26:45 pm
OK then you are hitting the modular table limit so the solution is to merge several tbm's into one.
Title: Re: Saga-Modding
Post by: Dragon on May 03, 2012, 03:31:17 am
tbm. I also had the same problem in the Beta with the Scooby models. In the prologue np. There I already use over 200 models and no problem :(
Well, on of the worst decisions Saga team made was to base their fork off a normal build instead of Inferno. You'll have to wait for source code release, since the ship limit in normal builds is rather pathetic. 130 ship classes and 200 weapons is what you get with a Saga build. And the "stock" ships use up most of this limit.
Title: Re: Saga-Modding
Post by: Aginor on May 03, 2012, 04:25:05 am
That's one reason why I don't use tbm files for my mod. (the other one being that I don't really understand how they work^^)
I didn't want to have double the ships suddenly just because I wanted to have some of them flyable.
Title: Re: Saga-Modding
Post by: The_Force on May 03, 2012, 04:44:29 am
Its not the ship limit there hitting I believe it's the modular table limit.
Title: Re: Saga-Modding
Post by: Aginor on May 03, 2012, 08:02:06 am
This might be a stupid question, but....
 
Is it possible to have limited ammo for primaries? I'm talking about the stormfire cannon from WC4 obviously. I might include it for fun if it works.


Second question: Let's say I wanted to do something like the Swarmer pod of the Wasp fighter in WCP or the 4in1 FF missile the Vampire carries. Is that possible?
The latter one perhaps with that "spawn" thingie? So one non-homing missile that creates 4 Pilum FF when it explodes via remote detonate or something.
The rocket pods of the Tigershark shouldn't be much of a problem I think, I just need fast firing dumbfire rockets that use small space.

Disclaimer: No, I don't want to include Prophecy ships in my mod. Yet.
Title: Re: Saga-Modding
Post by: Dragon on May 03, 2012, 08:12:31 am
Check out Scooby's Prophecy-era weapons. They have everything, and I can PM you my version of Tracker MIRV if you want. WC4 Stormfire is better done via secondaries, but the WCP version can be a primary. TBH, I've got most of the WCP-era missiles tabled. I can PM them to you if you want. They all use Saga models and effects.
Title: Re: Saga-Modding
Post by: Aginor on May 03, 2012, 10:28:23 am
sure, that sounds interesting!
Title: Re: Saga-Modding
Post by: Aginor on May 18, 2012, 09:34:08 am
Hi there!
After finishing mission 4 and nearly finishing mission 5 of my campaign I encountered a problem I couldn't solve yet. I don't want to spoil too much of the story but I have thought of an example that is exactky the same:

4 ships are supposed to land on a base. So they should fly straight into the hangar bay and shut their engines off. Sounds easy and it worked as long as there wasn't anything to harm them.
Here's what I did and what happened:
- I created a waypoint path that leads into the base's hangar bay
- I created an event that shuts off the engines on the ships and lets them play death once they are landed. (ship 1 when it is 10m away from the last docking waypoint that is placed at the end of the hangar bay, ship 2 when it is 60m away, ship 3 at 120m and ship 4 at 180m) They fly in something that looks like a line formation 500m behind each other. It looked pretty cool.
- I added enemies and so on and noticed that the ships dodge fire and miss their approach, crashing into the base or flying circles.
- I changed their AI to the one created by the Saga team for the skipper missile. It doesn't dodge at all. works. They fly straight in even if they are fired at.
- They are attacked by enemies and of course somebody rams them or something. So it doesn't work anymore. Either they try to fly into the base rolled wrongly and crash or they somehow re-activate dodging and abort a perfect approach a few meters away from the hangar. I don't know what happens.
- I tried to correct the course by set-object-facing-object and such things but didn't manage to correct that behaviour. That's where I'm stuck. Otherwise the mission works perfectly.

What I need: A script or something that allows a ship to fly into a hangar, correcting its flight path at a certain point before the hangar bay.
Alternatively I need a cutscene that shows how the ships (those which are still alive) fly into the hangar bay.

Any help would be much appreciated. :)
Title: Re: Saga-Modding
Post by: The_Force on May 18, 2012, 10:07:43 am
Look up landing in the wiki if it's in the saga build that's probably what your looking for.
Title: Re: Saga-Modding
Post by: Dragon on May 18, 2012, 10:14:07 am
It's not. Landing code doesn't seem to be in Saga, nor does it affect AI. It's modifies to the way collisions act.
Title: Re: Saga-Modding
Post by: The_Force on May 18, 2012, 10:26:43 am
OK, then Aginor I'm afraid I can't help.
Title: Re: Saga-Modding
Post by: Aginor on May 18, 2012, 10:35:50 am
The collisions aren't really the problem, I think I already have a solution for that. My problem is that in most cases the ships don't try to fly into the hangar at all or do it in some strange way, far off the waypoint path.
Title: Re: Saga-Modding
Post by: Aginor on May 18, 2012, 11:04:16 am
Ok, in the last try I got two ships to land at least, the key was to disable dynamic goals, making the AI even more stupid.
I think the problem is that they keep missing their waypoints and thus turn around to touch it.

My next approach will be to delete the waypoint route and give them single points to fly to. I will check if they are near them and then change the waypoint manually. Maybe that will work.
Title: Re: Saga-Modding
Post by: Dragon on May 18, 2012, 12:33:55 pm
IIRC, this is fixed in normal SCP builds, but Saga might not have this. I can't wait for the source code release.
Title: Re: Saga-Modding
Post by: Aginor on May 18, 2012, 05:27:57 pm
I "solved" the problem like this:
There are four waypoints in the hangar bay, called "parking". As soon as one of the ships reaches the waypoint that I put directly in front of the fighter bay door it "snaps" on its parking place using the set-position SEXP. I also use face-object to align the ship neatly.
I know that doesn't look perfect, but I made sure that the player is busy looking somewhere else anyway, so it works until I find something better. I think I will finish this mission tomorrow and then I have half of my mini campaign complete. :)
Title: Re: Saga-Modding
Post by: Aginor on June 04, 2012, 05:39:45 am
Hi again!
I have some questions:

- It is possible to determine which kind of missile is on a secondary bank? I know I can set it, but it seems I can't read it.
- Is it possible to somehow read the energy status?
- is it possible to detect when the player gives orders (form on my wing for example) via the comm menu? I know I can monitor keys via events, but is that also possible when the player clicks?
- Is it possible to detect other keystrokes except those I can pick in FRED? I would like to have a shortcut for a function but I can't choose it from the menu in FRED.

Thanks in advance!
Title: Re: Saga-Modding
Post by: karajorma on June 04, 2012, 06:59:37 am
- It is possible to determine which kind of missile is on a secondary bank? I know I can set it, but it seems I can't read it.

Use the has-secondary-weapon SEXP. If you need to know which weapon it has

when-argument
-any-of
--List of Weapons
-has-secondary-weapon
--Ship Name
--Weapon Bank
--<argument>
-Modify-Variable
--SecondaryBank[<None>]
--<argument>

Quote
- Is it possible to somehow read the energy status?

weapon-recharge-pct

Quote
- is it possible to detect when the player gives orders (form on my wing for example) via the comm menu? I know I can monitor keys via events, but is that also possible when the player clicks?

Query-orders (don't use the order SEXP, it's ****!)

Quote
- Is it possible to detect other keystrokes except those I can pick in FRED? I would like to have a shortcut for a function but I can't choose it from the menu in FRED.


Nope. You'd need to use scripting for that.
Title: Re: Saga-Modding
Post by: Aginor on June 04, 2012, 08:31:18 am
Thanks for you reply, karajorma!

I think I was a bit unclear about the energy thing.
I found the weapons energy but I did mean the energy distribution.

The topic is the cloaking of the player flyable Strakha fighter which I have implemented using four events, three variables and a ghost. It works mostly although I had to do some funny things to make sure weapons and shields and stuff doesn't reset when cloaking or decloaking. I solved that problems by either storing stuff in variables (for example the number of missiles) or by copying stuff to a ghost and copying them back after the model change.

I just have some little problems left now:
- energy distribution resets while cloaking and decloaking
- the player can only use "Fang" missiles because all four Strakha models have it as default
- looping afterburner sound when using the afterburner while cloaking. Dunno why yet.

Wingmen are a totally different topic. For those I plan to use the old events Saga uses and change them a bit. The goal is that the wingmen cloak when they are ordered to form on the player. At the moment they default to uncloaked. Also AI Strakhas have an unlimited amount of missiles, so when the AI is good (wingmen have to be rather good) they fire a lot of missiles, so I have to fix that like I did for the player.
Title: Re: Saga-Modding
Post by: Aginor on June 04, 2012, 01:41:17 pm
Is the "has-secondary-weapon" SEXP new?
I can't find it either in the wiki or in Saga's FRED.

I fear it might have been introduced after Saga's branching.
Title: Re: Saga-Modding
Post by: karajorma on June 04, 2012, 09:40:12 pm
That is possible. I wasn't looking at WCS FRED.
Title: Re: Saga-Modding
Post by: Aginor on June 05, 2012, 06:01:53 am
No problem, this is only a very minor issue since the Strakha does carry Fang FF missiles most of the time anyway.

Your other hints were most useful. I wonder what I'd do without you and General Battuta, you guys rock!   :)

That leaves me with the excessive use of missiles by the AI. I think I might introduce a special Strakha wingman AI....
...or I'll just do the same as for the player, using a variable to store the number of missiles for each fighter.

At the moment cloaking for the player works with 5 events, a ghost and 3 variables.
For AI Strakhas that aren't wingmen I need 6 events and 4 variables.
For AI Strakhas that are wingmen I need 10 events (the 6 from above + some more for the controls) and 2-6 variables.
Title: Re: Saga-Modding
Post by: Dragon on June 05, 2012, 08:01:22 am
And in the main branch, you can do this using about half as many events and (probably) no variables at all...
I really can't wait for the Saga source code release.
Title: Re: Saga-Modding
Post by: SpardaSon21 on June 05, 2012, 12:19:56 pm
Errrr, why?  There isn't that much that FSO could use from WCS (correct me if I'm wrong!), and if you wanted an updated version of WCS with all the lovely features FSO has MatthTheGeek has started work on Wing Commander Open, a port of WCS to FSO.
Title: Re: Saga-Modding
Post by: The_Force on June 05, 2012, 12:31:09 pm
The New Cloaking Shader code.
Title: Re: Saga-Modding
Post by: SpardaSon21 on June 05, 2012, 12:58:31 pm
Cloaking shaders are a recent FSO development thanks to Valathil, not a WCS development.  WCS still uses change-ship-class for their cloaking.  At this point I haven't heard anything from the WCS team about them adding FSO features to WCS now that they've released, and I'm not sure there's all that much of their code that the SCP would find useful.  At this point all the source code release by the WCS team would do is satisfy the terms of the original release by Volition.
Title: Re: Saga-Modding
Post by: The_Force on June 05, 2012, 01:03:42 pm
Dragon means that in the main FSO code base it could be done faster than in WCS.
Title: Re: Saga-Modding
Post by: SpardaSon21 on June 05, 2012, 01:52:57 pm
Yeah, but I don't think many features from the main FSO code trunk will make it to WCS.  The whole point of them branching was that they wanted their own codebase separate from the awesome SCP features.
Title: Re: Saga-Modding
Post by: Dragon on June 05, 2012, 02:39:21 pm
I meant that once WCS releases it's source code, it's most important features will hopefully be ported to SCP. That would allow WCS to be adopted for the SCP builds, which would fix a lot of annoying things, including some really bad design decisions taken by the team and lack of cutting-edge SCP features. Also, it'd allow use of some neat WCS features in SCP mods.
Title: Re: Saga-Modding
Post by: SpardaSon21 on June 05, 2012, 03:17:51 pm
What most important features?  You're the one saying WCS has them, so what does WCS have that current SCP cannot do?  If there are any extremely important features, will they break compatibility with the retail game and violate one of the cardinal rules of the SCP?

Also, the WCS team does not want to use the main branch of FSO at all, otherwise they wouldn't have forked.  For some reason unfathomable to me, they want to use a separate codebase with separate features that does not use the latest optimizations, features, and SEXPs of the SCP.

http://www.hard-light.net/forums/index.php?topic=63607.msg1353055#msg1353055 (http://www.hard-light.net/forums/index.php?topic=63607.msg1353055#msg1353055)

According to that WCS forked back in February of 2010.  Unless they have been extremely studiously keeping up with SCP features they've missed out on a ton and may have wildly conflicting code, especially since they may have broken Rule #1 of the SCP and altered retail behavior.
Title: Re: Saga-Modding
Post by: MatthTheGeek on June 05, 2012, 03:23:44 pm
If there are any extremely important features, will they break compatibility with the retail game and violate one of the cardinal rules of the SCP?
There's always a way to implement features without breaking SCP rule #1. This is why we have tables and command-line flags to turn stuff on and off.

It is not, however, always easy or practical to do so.
Title: Re: Saga-Modding
Post by: Dragon on June 05, 2012, 03:35:58 pm
There's a new AIP flag, some critical bugfixes and lighting improvements.
Another important part would be allowing more than 4 secondary banks (WCS supports up to 6) and adding any new SEXPs WCS has. There are also new HUD features, though I'm not sure if they couldn't be done using Swifty's HUD code in the main branch.
Title: Re: Saga-Modding
Post by: SpardaSon21 on June 05, 2012, 05:42:13 pm
If there are any extremely important features, will they break compatibility with the retail game and violate one of the cardinal rules of the SCP?
There's always a way to implement features without breaking SCP rule #1. This is why we have tables and command-line flags to turn stuff on and off.

It is not, however, always easy or practical to do so.
That's mainly what I'm worried about.  A WCS hardcoded feature may be so tangled-up into the engine it isn't worth coder time to disentangle and make into a feature toggled or modified via table or flag.
There's a new AIP flag, some critical bugfixes and lighting improvements.
Another important part would be allowing more than 4 secondary banks (WCS supports up to 6) and adding any new SEXPs WCS has. There are also new HUD features, though I'm not sure if they couldn't be done using Swifty's HUD code in the main branch.
I'm reasonably sure that any critical bugs in FSO existing at the time of the fork have since been fixed in the two years since then.  A single AIP flag isn't that much, and Valathil has done so much more for lighting (like actual shadows in FSO) than the WCS team has.

Of course, any new features that are worth SCP coder time will never get ported to FSO until WCS releases their code and does a full diff, so instead of saying how awesome their code is, get them to release it so the SCP can look at it.
Title: Re: Saga-Modding
Post by: Dragon on June 05, 2012, 06:29:49 pm
I've been requesting it for quite some time now. I'm not talking about how awesome their code is, they've got some decent ideas, but I'm mostly interested in being able to adopt WCS to run on regular builds. I've tried working on a WCS mod, but I ran into a ton of limitations regular builds don't have anymore.
Title: Re: Saga-Modding
Post by: karajorma on June 05, 2012, 07:11:47 pm
One piece of code I'd be interested in looking at is how they've managed to get the pilot files to work from Documents\Volition\Wing Commander Saga. Not that I'd want to have it save there, Saved Games\FSO\Diaspora is the setting I'm after. :p
Title: Re: Saga-Modding
Post by: SpardaSon21 on June 05, 2012, 11:11:23 pm
I've been requesting it for quite some time now. I'm not talking about how awesome their code is, they've got some decent ideas, but I'm mostly interested in being able to adopt WCS to run on regular builds. I've tried working on a WCS mod, but I ran into a ton of limitations regular builds don't have anymore.
Well then, try working with MatthTheGeek on his project to port WCS over to FSO.
Title: Re: Saga-Modding
Post by: karajorma on June 06, 2012, 05:59:00 am
That was little more than a hack. The WCS source code would allow us to do it without the need for such hacks.
Title: Re: Saga-Modding
Post by: SpardaSon21 on June 06, 2012, 11:57:02 am
But until they do release their source and a diff, hacks are all we can do.
Title: Re: Saga-Modding
Post by: Aginor on June 06, 2012, 01:58:36 pm
IIRC one of the reasons for forking was that WCS needed some features that just broke the game because they weren't compatible with things WCS didn't need, and needed some fixes for things that weren't planned for the main branch any time soon. But WCS needed them NOW (then).
Also there wasn't time to check the whole game for compatibility every time a new build was released. So it was decided to use something that just worked with some changes and run with it.
Saga is one piece you can install and it runs. Feature creep kills projects. Especially big ones, we have all seen that happen numerous times.

Edit: besides I think you can't expect the SCP to implement features all the time which only your mod uses.

and yes, of course I would like to have some of the newer things in my campaign that the main branch has. But I'm not sure if it is worth all the grey hair I'd get trying to make things compatible and most Saga players outside of HLP (which is most of them) wouldn't even be able to play it, which would make a Saga mod pretty pointless.
Also keep in mind that most people out there don't want to play around with SCP builds and patches and stuff. They just want to play the game. A standalone build was the logical decision IMO. I remember how I hated it when I played TBP and there were lots of errors with my build and I had to read pages and pages of text here and somehow fiddle around with the game to get it to work. I am glad I did it because TBP is great, but I totally understand people who just don't want to do that.
Title: Re: Saga-Modding
Post by: MatthTheGeek on June 06, 2012, 02:48:10 pm
Edit: besides I think you can't expect the SCP to implement features all the time which only your mod uses.
Diaspora says hi. Just to pick one example among many.

EDIT: the thing is, anyway, that by definition, if SCP codes a feature for you, it's not JUST for you, it's for everyone else that might want to use it as well. It's never "hey, code this for me", but "hey, here's a cool feature that I really could use".
Title: Re: Saga-Modding
Post by: karajorma on June 06, 2012, 06:10:23 pm
IIRC one of the reasons for forking was that WCS needed some features that just broke the game because they weren't compatible with things WCS didn't need, and needed some fixes for things that weren't planned for the main branch any time soon. But WCS needed them NOW (then).
Also there wasn't time to check the whole game for compatibility every time a new build was released. So it was decided to use something that just worked with some changes and run with it.
Saga is one piece you can install and it runs. Feature creep kills projects. Especially big ones, we have all seen that happen numerous times.

Edit: besides I think you can't expect the SCP to implement features all the time which only your mod uses.

I don't think the SCP ever has implemented changes which only one mod could use. The trick is to implement them in such a way that any mod can use them if they want to. The old way of implementing changes using the TBP or WCS flags were actually quite bad in that they kept useful changes from other mods who wanted them but not the raft of other changes that were set by the flag.

Quote
and yes, of course I would like to have some of the newer things in my campaign that the main branch has. But I'm not sure if it is worth all the grey hair I'd get trying to make things compatible and most Saga players outside of HLP (which is most of them) wouldn't even be able to play it, which would make a Saga mod pretty pointless.
Also keep in mind that most people out there don't want to play around with SCP builds and patches and stuff. They just want to play the game. A standalone build was the logical decision IMO. I remember how I hated it when I played TBP and there were lots of errors with my build and I had to read pages and pages of text here and somehow fiddle around with the game to get it to work. I am glad I did it because TBP is great, but I totally understand people who just don't want to do that.

What is necessary is a much better installer/launcher to run the mod with. And the SCP is working hard on that with wxLauncher. Get that working nicely enough and upgrading builds would be pretty easy.
Title: Re: Saga-Modding
Post by: Aginor on June 07, 2012, 06:02:21 am
I'm looking forward to that!
When that finally happens I will even search for my old FS2 discs and install it again (or buy it somewhere if I can't find them) and play some campaigns. Maybe I'll even finish the retail campaign...
Title: Re: Saga-Modding
Post by: SpardaSon21 on June 07, 2012, 10:58:04 am
http://www.gog.com/en/gamecard/freespace_2 (http://www.gog.com/en/gamecard/freespace_2)
Can't go wrong for $5.99.
Title: Re: Saga-Modding
Post by: Aginor on June 07, 2012, 03:17:33 pm
I think it is only possible to pay there via credit card or paypal and I don't have either. But as soon as I have one I think I will buy WC1-4, Privateer, and FS1+2.
Won't be in the next months though, I have a full schedule at the moment with my mod and stuff.
Title: Re: Saga-Modding
Post by: Dragon on June 07, 2012, 04:50:55 pm
http://www.gog.com/en/gamecard/freespace_2 (http://www.gog.com/en/gamecard/freespace_2)
Can't go wrong for $5.99.
In civilized world, yes. If you happen to live in Eastern Europe, sucks to be you (speaking from experience :)).
Title: Re: Saga-Modding
Post by: Aginor on June 29, 2012, 06:25:35 am
Another small update on my Kilrathi mod and Campaign, for those of you who are interested in WC but don't read in WC forums:

Campaign:
- Missions 1 to 7 are done, except voice acting and testing. They also lack real briefings because I don't know to do them yet. I explain everything in command briefings at the moment
- Mission 8 is almost done, just missing messages and all that which is also missing in M1-7
- Mission 9 and 10: Not started yet, but the plan is complete.
- Story... well, I'm a bit stuck. I'm working on it.

Mod:
- Strakha is now ok to fly, including cloaking for wingmen as ordered by the player (there are still some minor issues with the Strakha but I can live with those for now since it would take too much of my time to fix them and I want to finish the things needed for the campaign first)
- Kofar-class support ship is ingame. I scripted the docking for refueling/rearming since I am either too dumb to add a support ship that actually does something or refueling/rearming is broken in the Saga build (the first possibility being the more likely one I guess)
It just works once per mission now, but I will try to fix that.
- I fixed the Bloodfang, so now it has a normal map, a working docking point and I also corrected the engines.
- I changed a few things on some Kilrathi ships to make them more suitable as player ships. In most cases that meant that I changed the number of decoys a bit.
I also added Glide to the Darket so it is more fun to fly.
I nerfed the Gothri a bit. It is a torpedo bomber, with a rear turret, good armor and good shields. It is also quite fast (as fast as a medium fighter). So I made it a bit less agile, otherwise it would make no sense at all to fly a Dralthi. Now it feels more like a fast bomber. It is still nimble for a bomber but not more than a medium fighter.
- I created two events that allow ships to lay mines (or turret mines if they are capships). First I had some problems because I couldn't despawn the turret mines again, I couldn't reference them in events because of their random names. But then I figured out how to change that so they now have previously defined names.
- Main hall is still missing, but I found someone who wants to do it and already did a concept. The plan is to have a rendered, animated main hall like Saga, but if it isn't finished for release it is not the end of the world. I will build a simple main hall to use in the first release if necessary.

And here are some questions to you:
- Is there a possibility to concatenate Strings in SEXPs? I solved my naming problem with ship-create using a different approach, but I wonder whether it would be possible to spawn a ship named "Zulu" + "<variable>" or to change the cargo of a ship depending on the time that has passed from "20 lifeforms" to "17 lifeforms", with one life form dying every 30 seconds or something.
- How can I use variables in debriefings (for example when I want my CO to say "You killed <variable> enemies more than your wingman! You are the greatest")?
- How do I disable a subsystem without destroying it? For example if I want to have a ship that has a turret (and the player can destroy it) but it doesn't use it until a certain point in the mission. Same goes for engines. When I have a ship that docks somewhere I want to disable the engine glow. But I don't know how.
Title: Re: Saga-Modding
Post by: The_Force on June 29, 2012, 06:33:49 am
For using a variable in debriefing take your example you use "You killed $Variable name enemies. For the turret use turret lock but the engine glows theres a new SEXp in new builds but didn't make it into saga so that's no possible.
Title: Re: Saga-Modding
Post by: Aginor on June 29, 2012, 06:56:41 am
Thanks!
The engine thing is not that important. Perhaps I'll just kill the engines, and with a bit of luck nobody will notice they are destroyed unless he flies really close. Or I just keep them running.
But wait... doesn't "ai-play dead" also deactivate the engines completely? I'm not sure. Have to check that again.
Title: Re: Saga-Modding
Post by: MatthTheGeek on June 29, 2012, 07:02:32 am
I doubt any AI orders has any effect on subsystems and stuff.
Title: Re: Saga-Modding
Post by: Aginor on June 29, 2012, 08:02:30 am
I think you're right, but I can't rule out the possibility that it was changed for the Saga build, so I'll check it anyway, just to be sure.
Title: Re: Saga-Modding
Post by: Aginor on June 30, 2012, 07:36:55 am
Next question!

I've started to work on briefings to decide whether I should do them or just use text as I do at the moment.
I created a Darket, made a Briefing Icon out of it and then did a simple briefing where a Darket moves around to test how it works. Ok so far.
Then I wanted to create a Ralaxath icon and did the same. But it didn't work. I just got a text but no icon.

So the question is: Do I have to create briefing Icons for all the ships manually or is there an automatic way of doing that? And where are those icons assigned to the model?

Or am I just doing something wrong again? Any help would be appreciated.

EDIT:
Nevermind, found it. It is the icons.tbl, which isn't filled very good since for Saga it wasn't needed (the briefings are ctscenes as you know).
So now I will do the following: I will make briefings icons for all the ships. I think I will use the target shield anis for it, just without the shield bars. That way I won't have the grid models the way WC fans are used to, but it will be less work.
Title: Re: Saga-Modding
Post by: Aginor on June 30, 2012, 09:36:46 am
Ehhh... or maybe not.
Is it even possible to create icons for all ships? The icons.tbl just has predefined classes in it.
So if it is possible to assign briefing icons to ship classes, how does that work?

EDIT: Dammit, I asked too soon again. I found topics where that is discussed now, and it seems what I'm trying to do seems to be impossible anyway. So nevermind, I'll create generic icons instead of icons for the ships.
Title: Re: Saga-Modding
Post by: Aginor on June 30, 2012, 05:17:44 pm
Triple post!
Whatever. There's some progress on my mod I want to tell the world about:

I finished a (for my purposes) complete set of mediocre looking briefing icons today.
I also figured out how briefings work now, so tomorrow I will use them to build some briefings. Until now I have only text in the briefings (actually I use the command briefing for everything and got no briefings at all), so this will be a nice addition I guess.

In other news: I finished another chapter of my story. I fear it will be loong and boring, but whatever. The good news is that nobody has to read it, the missions will contain only the small fraction that is really important for knowing what's going on.
Title: Re: Saga-Modding
Post by: Aginor on July 02, 2012, 08:39:44 am
I'll keep using this thread for status updates on my mod I guess.

I finished all the briefings for the existing missions yesterday. Whole day of work, but they look ok now.

Also I finished a (yes, mediocre looking) simple 2D main menu so I have a main hall until I get the 3D one.