Hard Light Productions Forums
Modding, Mission Design, and Coding => The FRED Workshop => Topic started 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:
- The Colossus is configured as a disabled hostile capship and shall serve as the racing-course and attack the racing contestants
- Navpoints serve as checkpoints and thus must be visible/selectable on the HUD.
- Besides you in a Pegasus there are 3 more AI-controlled Pegasi in your wing to race against.
- The first one who reaches the last waypoint alive shall win the race.
Here are the problems I have with this (some newb-problems, some with the engine, some with FRED2_Open):
The maximum of 8 navpoints is barely enough to create an interesting course.The hardcoded visit-distance of 1000m for the navpoints should be configurable by a SEXP like set-nav-visitrange.Welcome- and the Countdown-messages dont show up as intended."Win Race"-Directive doesn't show up.- The AI-ships don't follow the waypoints as fast as they could. Is there a way to set their minimum speed and force them to use their afterburner and energy settings?
They eventually start attacking the Colossus, inspite of the Flag "No dynamic goals".FRED doesnt remember the deselected "Stealth"-Flag for the Pegasus-ships and thus doesnt save it correct.
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]
-
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.
-
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:
$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:
$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
-
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?
-
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. :)
-
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
-
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 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
-
... 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? :)
-
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. :)
-
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... :)
-
You could create a new event that becomes true when the event you want as your origin becomes true.
-
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!
-
Crib from Axem's Super FreeSpace Cart. :P
-
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
-
It probably could if i just could find it somewhere
-
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?)
-
Where can i get it?
Super FreeSpace Cart
And can i fly race against an Ursa in a Perseus / Pegasus?
-
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]