Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: StingerAJ on July 31, 2009, 03:53:16 am

Title: Mission idea - Racing around the Colossus
Post by: StingerAJ on July 31, 2009, 03:53:16 am
Hello!

I am new to this community and would like to speak about some problems I have with FREDing a simple racing-mission around the Colossus-Capship.

The setup of this mission is as follows:


Here are the problems I have with this (some newb-problems, some with the engine, some with FRED2_Open):


Is there a better way to let the AI-ships race realistically? Maybe if I use ghost-ships as navpoints and let them chase those ghosts?

Any help is appreciated!

P.S.: I am sorry for my bad english.

EDIT: updated the mission with the latest changes.

[attachment deleted by Tolwyn]
Title: Re: Mission idea - Racing around the Colossus
Post by: Dilmah G on July 31, 2009, 04:35:48 am
That sounds like an interesting idea :)

With your message and directive issues, could you take screenshots of both the events (make sure you've got them all open, the event name isn't so useful here :P) and attach them to your next post on this thread? As with your AI waypoint problems, if you place navigation beacons, set them to hostile, and tell the competing fighter wing to destroy them in a set order they should go at max speed. Also, the ai-protect sexp will (or should) prevent the AI players from attacking the Colossus, so give that a go. You'll probably have to use sexp's to un-stealth the Pegasii.
Title: Re: Mission idea - Racing around the Colossus
Post by: StingerAJ on July 31, 2009, 05:06:03 am
That sounds like an interesting idea :)

With your message and directive issues, could you take screenshots of both the events (make sure you've got them all open, the event name isn't so useful here :P) and attach them to your next post on this thread? As with your AI waypoint problems, if you place navigation beacons, set them to hostile, and tell the competing fighter wing to destroy them in a set order they should go at max speed. Also, the ai-protect sexp will (or should) prevent the AI players from attacking the Colossus, so give that a go. You'll probably have to use sexp's to un-stealth the Pegasii.

If I use hostile navigaton beacons and let the AI-ships destroy them, I think they wouldnt have the motivation to reach the finish, because they will destroy it from a distance, is that thought right? And wouldnt they accidentally shoot their comrades in the back when they attack the beacons in a line?

Here is the code for the message events from the mission file, that I attached to my original post:

Code: [Select]
$Formula: ( when
   ( = ( mission-time ) 5 )
   ( send-message
      "#Command"
      "High"
      "Welcome to Race"
   )
)
+Name: Welcome
+Repeat Count: 1
+Interval: 1
+Chained: 0
+Team: 0

$Formula: ( when
   ( = ( mission-time ) 10 )
   ( send-message-list
      "#Command"
      "High"
      "Countdown 5"
      1000
      "#Command"
      "High"
      "Countdown 4"
      1000
      "#Command"
      "High"
      "Countdown 3"
      1000
      "#Command"
      "High"
      "Countdown 2"
      1000
      "#Command"
      "High"
      "Countdown 1"
      1000
      "#Command"
      "High"
      "Countdown Go!"
      1000
   )
)
+Name: Countdown
+Repeat Count: 1
+Interval: 1
+Chained: 0
+Team: 0

And here is the code for the directives:

Code: [Select]

$Formula: ( when
   ( and
      ( is-event-true-delay
         "Reach Finish"
         0
      )
      ( is-goal-true-delay "Win Race" 0 )
   )
   ( invalidate-goal "Win Race" )
   ( send-message
      "#Command"
      "High"
      "Won Race"
   )
   ( allow-warp
      "Alpha 1"
      "Alpha 2"
      "Alpha 3"
      "Alpha 4"
   )
)
+Name: Race Won
+Repeat Count: 1
+Interval: 1
+Objective:  XSTR("Win Race", -1)
+Team: 0

$Formula: ( when
   ( and
      ( is-event-true-delay
         "Reach Finish"
         0
      )
      ( is-goal-false-delay "Win Race" 0 )
   )
   ( invalidate-goal "Win Race" )
   ( send-message
      "#Command"
      "High"
      "Lost Race"
   )
   ( allow-warp
      "Alpha 1"
      "Alpha 2"
      "Alpha 3"
      "Alpha 4"
   )
)
+Name: Race Lost
+Repeat Count: 1
+Interval: 1
+Objective:  XSTR("Win Race", -1)
+Team: 0

#Goals ;! 1 total

$Type: Primary
+Name: Win Race
$MessageNew:  XSTR("Win the Race", -1)
$end_multi_text
$Formula: ( and
   ( not
      ( are-waypoints-done-delay
         "Alpha 2"
         "Waypoint path 1"
         0
      )
   )
   ( not
      ( are-waypoints-done-delay
         "Alpha 3"
         "Waypoint path 1"
         0
      )
   )
   ( not
      ( are-waypoints-done-delay
         "Alpha 4"
         "Waypoint path 1"
         0
      )
   )
   ( is-nav-visited "Nav 1" )
   ( is-nav-visited "Nav 2" )
   ( is-nav-visited "Nav 3" )
   ( is-nav-visited "Nav 4" )
   ( is-nav-visited "Nav 5" )
   ( is-nav-visited "Nav 6" )
   ( is-nav-visited "Nav 7" )
   ( is-nav-visited "Nav 8" )
   ( is-nav-visited "Nav 9" )
   ( is-nav-visited "Finish" )
)
+Invalid
+Score: 1000


Thx for your help!

StingerAJ
Title: Re: Mission idea - Racing around the Colossus
Post by: Dilmah G on July 31, 2009, 05:19:39 am
Oh yeah, and I don't think Navbeacons are destroyable anyway, if you set them to attack them, but change their orders once they got within 200 units (or whatever) and proceed to the next waypoint, which can be done via sexps, it should work.

I've got the flu, so I can't really focus at the moment sorry, but I don't see anything wrong with your message code. However with the directive, why do you want to invalidate the goal after it's been achieved?
Title: Re: Mission idea - Racing around the Colossus
Post by: karajorma on July 31, 2009, 06:43:13 am
The directive won't work cause it's the classic is-event-true-delay in a directive error.

Simply add the 3rd optional argument to that using Add Operator (You might have to do the same for is-goal-true as well) and I'll bet it starts to work. :)
Title: Re: Mission idea - Racing around the Colossus
Post by: StingerAJ on July 31, 2009, 08:08:43 am
Thx you two, you are really great supporters!

The thing with the 3d argument to is-event-true-delay did the trick. Now the directive is on screen and works.
The message-events now function properly too (I dont know why, could it be, that those 2 problems could have been related?).
Also I set my wingmates' initial orders to "Play dead" until the countdown ends, so we have a simultaneous start of the AI-controlled ships.
They don't yet race at high-speed, however. I will try the thing with letting them chasing invisible baits at the waypoints later, ie use invisible, non-collidable hostile nav beacons as a workaround for the navpoint-limit to see if the AI-ships push up the throttle.

Funny thing at the moment with the AI-ships is, that they hug each other when heading for the first waypoint. Aren't they supposed to watch on each other as a wing? Or is it because I gave the individual ships the order to follow the waypoints rather than the Alpha-wing?

BTW, is there interest in the community for multiplayer-races in this style? I can think of several race-types, ring-races, through asteroid-fields, Arcadia, through an ongoing bigger battle-environment. I think this would add some diversity to gameplay-styles, what do you think?

Are there similar efforts of constructing race-missions or even finished missions that I missed?

Anyway, I will attach an updated version of the mission to my original post.


StingerAJ
Title: Re: Mission idea - Racing around the Colossus
Post by: Wanderer on July 31, 2009, 08:15:21 am
I build a race mission with Axem and DaBrain for BTRL but it was not included as several issues were detected. By then the Lua scripting had no MP support what so ever so scripts evaluated locally. This meant that clocks that i scripted on the screen all showed different lag and lap times for each player.

Well.. i build part of the Lua script and Axem build the mission....

EDIT:
 
It was pure multiplayer racing mission. Script automatically swapped the target for the next gate as the current target was reached so you only needed to reach a gate and turn for the next one. iirc it also output the current personal best lap so you could when playing it alone race against the clock if you wanted to.

Basically whole 'racing engine' was made with Lua scripts
Title: Re: Mission idea - Racing around the Colossus
Post by: StingerAJ on July 31, 2009, 08:46:50 am
I build a race mission with Axem and DaBrain for BTRL but it was not included as several issues were detected. By then the Lua scripting had no MP support what so ever so scripts evaluated locally. This meant that clocks that i scripted on the screen all showed different lag and lap times for each player.

Well.. i build part of the Lua script and Axem build the mission....

EDIT:
 
It was pure multiplayer racing mission. Script automatically swapped the target for the next gate as the current target was reached so you only needed to reach a gate and turn for the next one. iirc it also output the current personal best lap so you could when playing it alone race against the clock if you wanted to.

Basically whole 'racing engine' was made with Lua scripts

Thats cool! Is the mission available somewhere for inspiration?

Greets, StingerAJ
Title: Re: Mission idea - Racing around the Colossus
Post by: StingerAJ on July 31, 2009, 08:49:25 am
... As with your AI waypoint problems, if you place navigation beacons, set them to hostile, and tell the competing fighter wing to destroy them in a set order they should go at max speed.  ...

Err, I tried to place nav beacons, but I didnt find it in the shiplist. How to add them?

EDIT: Nevermind, I got them. GTNB Pharos isn't a very intuitive name for them, is it? :)
Title: Re: Mission idea - Racing around the Colossus
Post by: karajorma on July 31, 2009, 10:10:43 am
I build a race mission with Axem and DaBrain for BTRL but it was not included as several issues were detected. By then the Lua scripting had no MP support what so ever so scripts evaluated locally. This meant that clocks that i scripted on the screen all showed different lag and lap times for each player.

Well.. i build part of the Lua script and Axem build the mission....

EDIT:
 
It was pure multiplayer racing mission. Script automatically swapped the target for the next gate as the current target was reached so you only needed to reach a gate and turn for the next one. iirc it also output the current personal best lap so you could when playing it alone race against the clock if you wanted to.

Basically whole 'racing engine' was made with Lua scripts

I've been meaning to mention porting that to Diaspora now that multiplayer SEXPs and lua variables have been fixed. :)
Title: Re: Mission idea - Racing around the Colossus
Post by: StingerAJ on July 31, 2009, 02:23:24 pm
I have a question regarding chained events:

Is it possible to chain more than one event to a specified event?
I think I need this to ensure that neither the AI-ships nor the player-ship skip a waypoint and trigger the false "Reach Nav x"-event.
So I could construct 2 event-chains "Player Reach Nav x" and "AI Reach Nav x" each depending on the "Start of Race"-event.

The GUI of the FRED-Event-Editor suggests that this is not possible, but I wanna know for sure. Or maybe there is an easy way around this.

StingerAJ

BTW, I am currently switching navpoints to nav beacons and ai-waypoints-once for ai-chase and hope that it works better in terms of course-construction and AI behaviour. I will let you know if you don't already... :)
Title: Re: Mission idea - Racing around the Colossus
Post by: General Battuta on July 31, 2009, 02:33:36 pm
You could create a new event that becomes true when the event you want as your origin becomes true.
Title: Re: Mission idea - Racing around the Colossus
Post by: StingerAJ on July 31, 2009, 02:45:05 pm
You could create a new event that becomes true when the event you want as your origin becomes true.

Oh, thx, that idea is so simple that I didnt think of it. Great!
Title: Re: Mission idea - Racing around the Colossus
Post by: NGTM-1R on July 31, 2009, 04:41:23 pm
Crib from Axem's Super FreeSpace Cart. :P
Title: Re: Mission idea - Racing around the Colossus
Post by: StingerAJ on July 31, 2009, 06:09:35 pm
AI-ships Alpha 2 and 3 stop now near the first nav beacon. Alpha 4 races correctly from nav beacon 1 thru nav beacon 3, but it has wayfinding-problems getting to beacon 4. Why does only Alpha 4 progress so far? I tried a higher Repeat Counter for the Events "AI Reach Nav x", I tried every-time-argument but to no avail.

Anyway, Im done for today, CU all tomorrow...

StingerAJ
Title: Re: Mission idea - Racing around the Colossus
Post by: Wanderer on August 01, 2009, 03:44:38 am
It probably could if i just could find it somewhere
Title: Re: Mission idea - Racing around the Colossus
Post by: Axem on August 01, 2009, 10:01:48 am
Crib from Axem's Super FreeSpace Cart. :P

My god, I had forgotten I had ever done that.   :eek2:

(What was I on back then anyway?)
Title: Re: Mission idea - Racing around the Colossus
Post by: Colonol Dekker on August 02, 2009, 06:26:55 pm
Where can i get it?
Quote
Super FreeSpace Cart
And can i fly race against an Ursa in a Perseus / Pegasus?
Title: Re: Mission idea - Racing around the Colossus
Post by: StingerAJ on August 27, 2009, 05:14:58 pm
Hi,

I have updated the racing-mission. I tried to use path-flown, waypoint-twice and waypoint-missed for the player-ship, but the game-engine registers the first Nav-point twice when I fly through it normally. Is there a bug with waypoint-twice or with my mission?

I also have reverted the AI-behavior to ai-waypoint-once, since they dont follow the course with ai-stay-near-ship.

Any feedback or help would be helpful.

StingerAJ

P.S.: I am also working now on the multiplayer-version of this mission. What would be the best method to test this?

EDIT: sorry, now I updated the racing-mission in the first post. Please redownload, test and tell me how to fix it...

[attachment deleted by Tolwyn]