Author Topic: Amassed fredding questions....  (Read 2140 times)

0 Members and 1 Guest are viewing this topic.

Offline Skullar

  • 29
Amassed fredding questions....
Hello there folks !

I have a couple of questions I ran across while fredding EACW stuff.

1. Trouble with objectives.....

I seem to have trouble with the mission objective list left on the hud.
On some cases the objectives are not shown ingame, on some cases they do not show until the event itself has become TRUE. Are there some rules to be followed ?
For example, I used another SEXP in the condition ( though an inappropriate one for the intended task ) and suddenly the objective appeared ingame. Is there some inofficial know-how I missed or do I simply have a buggy build ( using a 3.6.10 one ) ?

2. Know-how question. To speed up gameplay and to reduce frustration, I am trying to develop a "SKIP-SCENE" feature.

General Idea : When you press a key, the screen blacks out, fades in again, and continues with a precisely predetermined setup ( that means all ship positions and orientations all set up again manually with SEXPS )
Like this, if you repeatedly are killed in a difficult fight, you dont have to listen to longer dialogues again and again prior to it when replaying the mission over and over.

The problem is :

Lots of SEXPS have to become "ineffective". Chatter has to be skipped, and so on......
I think it CAN be done by introducing something like a "mission stage" variable. But this would requiere EVERY sexp would have to be enlarged and combined with this stage variable.



- When
     - original condition


would translate into

-  when
     - and
          - original condition
     - =
           - mission stage variable
           - certain value



You understand ? It would be a pain in the ass. Does stuff like that slow down gameplay ? Is there an easier way for it ?

 
Re: Amassed fredding questions....
For the first one, you're probably using is-event-true-delay in the directive event. There is an optional third argument which you have to add and set to "true", indicating that it is a directive-related event.

As for the second, what you have there is probably the best solution...

 

Offline Skullar

  • 29
Re: Amassed fredding questions....
thx !

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Amassed fredding questions....
I tend to agree that the way you've got it in the second question is about as good as it's going to get. I wouldn't worry too much about the amount of CPU power it's going to cost though. I've never even seen the SEXP code appear when profiling the code.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Skullar

  • 29
Re: Amassed fredding questions....
You are right kara. Works well :)

I did it that way : Whenever you have the possibility to skip a scene an EACW logo appears in the upper left corner of the screen. When you press "keypad enter" the screen fades out, fades in again and you have bypassed a longer period of uneventful chatter. Great if you have to replay missions due to lost battle events or so...

The variable worked quite well.

However it is important NOT to use the send-message-list SEXP, but stick to chained send-message SEXPS, each with a ( when .. mission-stage = certain value ) condition. Like this you can skip dialogues from a point on.
Everything else can be easily adjusted. I am very satisfied with the results.

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: Amassed fredding questions....
You are right kara. Works well :)

I did it that way : Whenever you have the possibility to skip a scene an EACW logo appears in the upper left corner of the screen. When you press "keypad enter" the screen fades out, fades in again and you have bypassed a longer period of uneventful chatter. Great if you have to replay missions due to lost battle events or so...

The variable worked quite well.

However it is important NOT to use the send-message-list SEXP, but stick to chained send-message SEXPS, each with a ( when .. mission-stage = certain value ) condition. Like this you can skip dialogues from a point on.
Everything else can be easily adjusted. I am very satisfied with the results.
I was thinking of implenting something similar in my 'not anywhere near release for an other year' mod. May I be so bold to ask you for an example on how you achieved the desired effect?
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline Skullar

  • 29
Re: Amassed fredding questions....
Uhmm... I dont have one here ( no internet at home ) but I can describe it :

FIRST : Think of HOW your mission can divide up into partitions. Like

  mission stage 1 : Fly around and chatter
  mission stage 2 : Enemies jump in
  mission stage 3 : when enemies defeated, fly the long way to ship XY
  mission stage 4 : when you have reached ship XY, more enemies jump in.

If your mission is set up like this ( for example ) it would be nice if you could jump to stage 2 when you are in stage 1, and if you could jump to stage 4 when you are in stage 3.


Technical part :


You have to use a variable, I call it    MISSION-STAGE , default value is 1.
Throughout your mission , you can either jump to next stage, or the stage is reached automatically. In both cases, the variable counts up.  For example :

event    STAGE 2 - CHATTER IS DONE, ENEMIES ARRIVE
     when
             or
                   has-time-elapsed
                          300     ( hey ! There has been a lot to discuss !!!   )
                   is-event-true-delay
                          JUMP TO STAGE 2
                                 0
             modify-variable
                     mission-stage
                     2
           


So. It is stage 2 after 300 secs ( = 5 minutes ) or after you pressed a key, for exaple pad-enter. This option requires another event :

event   JUMP TO STAGE 2
       when
              and
                      =
                              mission-stage (1)
                              1
                      key-pressed
                               pad-enter
       modify-variable
                mission-stage (1)
                2

you can add a FADE-OUT SEXP, and a FADE-IN in a chained event following this one. This chained event following the JUMP TO STAGE 2 can also feature things like coordinate manipulation and all kinds of stuff that is needed to set up things that would have happened if the mission has carried along regularly.


So, the AND - condition assures that you will only jump to stage 2 when you are still in stage 1. This trigger becomes obsolete if you have reached stage 2 through regularly waiting 5 minutes, as it should be.




Last but not least : You will have to look through ALL your events and check if they require a mission stage check. Some things, especially chatter that would have occured at a certain timestamp shall not happen if you have jumped to a new stage already.

So. something like


event CHATTER 14
     when
              has time elapsed
                       135
      send-message
              Alpha1
              high
              message14



translates into


event  CHATTER 14
      when
              and
                     =
                           mission-stage (1)
                           1
                     has time elapsed
                           135
      send-message
              Alpha1
              high
              message14


Any questions ?


  

Offline CP5670

  • Dr. Evil
  • Global Moderator
  • 212
Re: Amassed fredding questions....
I tend to agree that the way you've got it in the second question is about as good as it's going to get. I wouldn't worry too much about the amount of CPU power it's going to cost though. I've never even seen the SEXP code appear when profiling the code.

There was actually one place involving every-time where this became a problem for me, with some events behaving differently on different computers. Although what he has done there will certainly cause no issue.