Jump to content
Sign in to follow this  
maruk

New editing options in resistance

Recommended Posts

Guest

OFPEC is always one step ahead when it comes to mission editing smile.gif

I'll copy some of the goodies from the thread here for convinience (since you have to register to look at the OFPEC forums) , but I strongly urge anybody who is seriously interested in mission editing to go and visit their forums. smile.gif

..or even better, I urge everybody from the OFPEC forums to come and start posting here biggrin.gif

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">

OK, here's what I've found out in ten minutes:

SetTerrainGrid Number" seems to be used to set up the terrain grid size. My guess is that the number is the grid size in meters. But that should be tested. Typical values are 50 or 25.

AddWeaponPool ["WeaponName", Count], AddMagazinePool ["MagazineName", Count] and PickWeaponPool VehicleName seem to add a unit's weapons/a vehicle's weapon cargo to a weapon pool that is saved throughout the campaign. That would enable the equipment management system of Resistance. FillWeaponsFromPool UnitName seems to set up the gear selection window of a unit according to the weapn pool. To enable the weapon pool the variable WeaponPool in the campaign's description.ext has to be set to 1.

Weapons UnitName, Magazines UnitName return an array of a unit's weapons/magazines.

Variable = UnitName SaveStatus "StatusID" and Variable = UnitName LoadStatus "StatusID" seem to save a unit's status throughout the campaign and retrieve it.

Another thing I discovered is that there's at least one new vehicle named "Bomb". You can use it to create an explosion:

BombName = "Bomb" CreateVehicle Position; BombName SetDammage 1

It may not be much and many things still have to be tested, but hey it were only ten minutes

The syntax for ButtonAction is:

String = ButtonAction Number No idea what it does though. I tried the numbers from 0 to 50 but the result was always "".

VehicleName SetObjectTexture [Number, "PictureName] Some of you may have noticed that there are some new resistance BMPs/T80s/T72s with green markings on it. With SetObjectTexture you can change these markings to any texture you want. This command only seems to work with T72s, T80s and BMPs. The only value for Number that worked for me was 0. There may be others. But ya know, 15 minutes . Also not only the vehicle that is used seems to be affected but all vehicles. I even tried to change the marking of an east BMP and the marking of a Resistance BMP was changed, too.

time SetRain amount

works like SetOvercast and SetFog, but you can now specifically set the amount of rain (amount=0,...,1). Only works if there is enough overcast (seems sensible  )

object = Object ID-number

In the editor you can now select to show the IDs of all static objects like bushes, trees, houses (you have to zoom it quite close). The above command seems to return the actual object for such an ID.

string = PrimaryWeapon unit

string = SecondaryWeapon unit

skill unit

returns the skill of an unit

an_object animate ["animation", number]

I don't know what it does!

Then this are the ones, that I don't know, they weren't even used in the Campaign or SP/MP-Missions, or they just did nothing to me:

animationPhase

buttonAction

buttonSetAction

createDialog

deleteIdentity

onBriefingNotes

onBriefingPlan

setObjectTexture

And here is a list of all new animations, that were used in the Campaign:

FXDismay: This is the animation that we know from the trailer, as a bomb exploded behind a man and he looked immediately back

FXToKneel, FXFromKneel, FXShow1, FXShow2, FXShow3, FXShow4, FXInKneel, FXCivilHandMouth, FXCivilLookBack, FXCivilFoldArms, FXFromTable, FXSitRightHandDown, FXSitLeftHandDown, FXSitHandsOnTable, FXToTable, FXCivilLookaround2, FXCivilFoldOnesArms, FXCivilArmsAkimboR

ok more anims

FXBase0

FXexecution

FXexecutionDead

FXdismay

FXshow5

FXCivilLookaround

FXCivilLookaround2

FXCivilLookback

FXCivilArmsAkimboR

FXCivilArmsAkimboL

FXFromTable

FXToTable

FXToHand

FXInHand

FXInHandStat

FXFromHand

FXNewcivil

FXWomanSur  

just figured out how to use the mysterious "drop" command. Its pretty useful for tons of things, like creating smoke or flames in realtime. Check out the demo I've posted earlier in this forum (there're screenshots for those who do not have Res yet .

Here's a typical call:

drop ["cl_fire", "", "Billboard", 1,_frames, _velocity, [random 0.5,random 0.5, random 0.5], 0.005, 0.004, 0.004, random 0.2, [(0.1 + 0.2 * _lifeTick/_lifeTicks) * _intensity, (0.1 + 0.5 * _lifeTick/_lifeTicks) * _intensity, (0.1 + 0.1 * _lifeTick/_lifeTicks) * intensity], _colors, [0,1,0], 0.5, 0.05, "", "", ""]

I know maybe 50% of the parameters so it still needs some figuring.

_frames is the number of frames per animation. 0 means there will be no animation at all. A good value is 2 for a high frequency. Note that these values are extremely sensitiv!

_velocity is a 3-dimensional velocity vector which transforms the object (I figure this vector is added to the object's position once per frame. Use zero vector if you don't want any transition at all)

_intensity is the size of the flame/smoke object, e.g. 5

_lifeTick is a decrementive counter ("ticker") which adresses each frame of the animation. Should be initialized with

"_lifeTicks" and decreased with each loop cycle until its zero. Dunno what happens if the counter drops below zero but dire things could result  

_lifeTicks is computed as follows:

_lifeTicks = _lifeTime/_freq

where _lifeTime is the duration of the object (in secs) and _feq is the frequency at which the animation is updated (should be at least 10Hz).

_colors is a 4-dimensional field of RGBA values, eg

[[1,1,1,0], [1,0.5,0.5,1], [1,0.1,0.1,0.6], [1,1,1,0]]

As I understand it, the animation runs from item 0 to item 3, but I'm not sure of it. Anyway, the color of the object is  interpolated from a weighted sum of these 4 colors. Its quite easy to use small cloudlets which slowly fade from white to red to simulate sparks. Equivalently, cloudlets which fade from gray to black can be used to simulate smoke.

Play with it, have fun...

and don't let the 19 parameters haunt you

The new syntax of the NearestObject command is:

ObjectName = NearestObject Position

and btw

------------------------------------------------------------------------ --------------------

2D BUTTONS

class RscButton

{

 type = CT_BUTTON;   // Control-Type Button

 idc = 105;     // Control ID (chooseable)

 style = ST_CENTER;  // left, center right

 colorBackground[] = {0.5, 0.5, 0.5, 1}; // Background-color

 colorText[] = {0, 0, 0, 1}; // Text-Color

 font = FontHTML;    // Font

 sizeEx = 0.02; // Font size

 x = 0.2;  // x-coordinate in %

 y = 0.1;  // y-coordinate in %

 w = 0.1;  // width   in %

 h = 0.1;  // height  in %

 text = "Button";    // button caption

 soundPush[] = {"ui\ui_cc", 0.2, 1}; // Sound, when button is pressed but not released

 soundClick[] = {"ui\ui_ok", 0.2, 1}; // Sound, when button is pressed and released

 soundEscape[] = {"ui\ui_cc", 0.2, 1}; // Sound, when button was pressed, but escaped

 action = "";  // action to be performed, i.e. "[] exec ""somescript.sqs"""

};

------------------------------------------------------------------------ --------------------

2D Edit

class RscEdit

{

 type = CT_EDIT;  // Control Type Edit Box

 idc = 105;  // Control ID

 style = ST_LEFT; // Style, left, center, right

 font = FontHTML; // font

 sizeEx = 0.02;   // font size

 x = 0.3;

 y = 0.3;

 w = 0.4;

 h = 0.05;

 colorText[] = {0, 1, 0, 0.5}; // color of edit box and text

 colorSelection[] = {0, 0, 0, 1}; // color of selected text

 autocomplete = false;  // enables autocomplete feature

 text = "MyText";  // text, that shall bes displayed

};

entered text can be accessed via ctrlText

I think, it is not possible to use Resources as output without creating a dialog! The problem is the command "ctrlSetText", which is used with static text. And the control "static text" is bound to a dialog!  

But as I say, I think, therefore I didn't try it before! Perhaps my reference helps you!

Your second question:

The game is not paused, while you see and interact with a dialog, just place a jeep and let him drive, you'll see that the game is running!

EDIT:

I just realized a contradiction in my answer! Surely you can use controls as a nicer output for your scripts! You can even monitor a lot of variables at the same time (just draw some static text at the laptop, and change their text with ctrlSetText)!  

The only disadvantage is, that you can't move and shoot while the dialog is displayed!

Dialog Example

<span id='postcolor'>

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Sefe @ July 12 2002,10:20)</td></tr><tr><td id="QUOTE">May I kindly direct you to this thread in the OFPEC forums. You'll find a sample mission with some other objects that can be used as a 'canvas' for dialog elements. There are even more...<span id='postcolor'>

sefe i did that, but i want to put a inofficial one, and don't think that work.. for now that is..

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (GranQ @ July 11 2002,03:59)</td></tr><tr><td id="QUOTE">2nd question, you guys know/think if i can change it while watching, lets say the on the one maruk did, if i had clicked jeep and then ok, is there anyway i could have stay in that menu and the pic for the jeep changed?<span id='postcolor'>

In this case, just make your own button/active text and make action = "[] exec ""myscript.sqs"""

In this script you do just a lbSetPicture;

the Problem with the OK-Button is, that it is a predefined control and therefore its behaviour is predefined!

Why does nobody from BIS answer this thread?

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (denoir @ July 12 2002,05:00)</td></tr><tr><td id="QUOTE">OFPEC is always one step ahead when it comes to mission editing smile.gif<span id='postcolor'>

Well then... they must have figured out the slider, I'll go have a look. wink.gif

Share this post


Link to post
Share on other sites

Well nobody has figured out the slider data thing, but here is a sample menu from me.

Allows you to change viewdistance and terrain grid during MP games. (when added to mission, careful with terrain grid as a mismatched setting will cause you to warp around in MP games)

http://members.rogers.com/ct-hru/basicMenu.zip

Ignore whatever triggers there are in the miss. Use the radio to load up dialog.

EDIT: a more advanced version of dialogs for Multiplayer can be found at http://members.rogers.com/ct-hru/bn880_Dlg_Options&Markers.zip

Share this post


Link to post
Share on other sites

Thanks bn880...can you please clarify what you mean by "mismatched setting"? Do you mean mismatched among the clients in the game?

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Suchey @ July 12 2002,14:43)</td></tr><tr><td id="QUOTE">Thanks bn880...can you please clarify what you mean by "mismatched setting"? Do you mean mismatched among the clients in the game?<span id='postcolor'>

Precisely, that's what inoticed. And it makes good sense too.

Share this post


Link to post
Share on other sites

Thank you...I just wanted to make sure I understood you correctly. Thanks for the quick response.

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (denoir @ July 13 2002,04:00)</td></tr><tr><td id="QUOTE">OFPEC is always one step ahead when it comes to mission editing smile.gif<span id='postcolor'>

Well duh tounge.gif

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">..or even better, I urge everybody from the OFPEC forums to come and start posting here biggrin.gif

<span id='postcolor'>

BLASPHEMY!!!! biggrin.gif

Share this post


Link to post
Share on other sites

Just like PiNs, when he finally talks he doesn't make any sense tounge.gif

Share this post


Link to post
Share on other sites

it took 12 pages to find this thread, whew.

What has become of Kegetys new system, the spectator mode. Is it fully working?

The very idea that the spectator mode exists make 15 minutes as a seagull quite bearable.

I would really like to see (and implement) the current state of this system, as it is an important development / improvement in MP.

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Nagual @ July 24 2002,19:28)</td></tr><tr><td id="QUOTE">What has become of Kegetys new system, the spectator mode. Is it fully working?<span id='postcolor'>

Despite the OFP dialog bug its working fine, I have further updated it from the version posted here, I added some code to "compensate" with warping of the spectated object which makes it much more enjoyable to watch as the camera doesnt warp with the object...

Share this post


Link to post
Share on other sites

Cool,

is it possible to try out the updated version?. I should be able to run an online test tommorow, replacing group/ seagull respawn in coop. The test posted here is really good, impressive.

Share this post


Link to post
Share on other sites

Keg I too wouldn't mind checking your new spectator script out, could you also add a shoulder or cockpit view option as well?

Full credit to you smile.gif

Share this post


Link to post
Share on other sites

Here: removed tounge.gif

I have done some "field test" with the script online on real missions, and it seems to work pretty well... The top view tends to shake pretty much though, and for some weird reason it doesnt work properly if the "target" is inside a building, the camera just stays at the ground level inside the building floor...

Edit: use this instead: http://koti.mbnet.fi/kegetys/flashpoint/spectatetest4.intro.zip

I changed the way top view camera works, it shouldnt shake anymore.

Share this post


Link to post
Share on other sites

Hello,

This script is awesome, it permits many things, like limited respawning with a very nice interface between respawns.

Superb work! Many thanks Kegetys.

Share this post


Link to post
Share on other sites

good job Keg, just wondering what command would terminate the script lets say if a new rounds starts?

Also have you tried to do a shoulder cam view? it might solve that building problem, I have seen a shoulder cam done before on some St Marie Map were it also had a spy camera the player could use via the action menu.

Share this post


Link to post
Share on other sites

Hi,

We have sample of the part of control types but not for :

CT_USER

What is it?

Share this post


Link to post
Share on other sites

cool, havent had time to check in mission yet, but cool smile.gif

Share this post


Link to post
Share on other sites

I've been thinking..

Aside from this sytem being very cool and enjoyable, it provides a "referee" platform for league/ clan matches, to deter online cheating.

Also, there is that old respawn parameter that is broken, # 5, for Side respawn. If only the spectator system could be incorporated into that parameter (if BIS dont have any plans for implementing side respawn).

And Kegetys you should probably put your name in the rsc somewhere, so people can see at a glance who made it.

Share this post


Link to post
Share on other sites

Man this custom dialog feature is nice...

I converted skirmish 4 to SP using basic dialogs, making a little "skirmish mode" for Opflash, like how other games have skirmish modes to just have a quick game and shoot things / blow things up.

it is here if anyone wants to download it:

Edit: New version, after exporting the first one the first dialog would load at briefing, that is now fixed.

SP Skirmish

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (PRiME @ July 28 2002,08:52)</td></tr><tr><td id="QUOTE">good job Keg, just wondering what command would terminate the script lets say if a new rounds starts?<span id='postcolor'>

closeDialog 821151551

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">Also have you tried to do a shoulder cam view? it might solve that building problem, I have seen a shoulder cam done before on some St Marie Map were it also had a spy camera the player could use via the action menu.<span id='postcolor'>

I have done some tests with 1st person camera, but there are some issues with it (the action menu of the spectated object is visible & useable, and you can "talk" as him by the radio...) I will test it online someday and see if the same stuff happens there...

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Kegetys @ Aug. 12 2002,00:28)</td></tr><tr><td id="QUOTE">I have done some tests with 1st person camera, but there are some issues with it (the action menu of the spectated object is visible & useable, and you can "talk" as him by the radio...) I will test it online someday and see if the same stuff happens there...<span id='postcolor'>

Kegetys, that thing is incredible! Would you mind if I tried to incorporate it in one of my MP missions? Giving you full credit of course!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×