May 13, 2024, 04:56:57

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Blazar

Pages: [1]
1
Scripting / Fire Missile
« on: July 21, 2011, 13:28:27 »
In new_cinema_mode, i want to enable the ships to fire their missisles i.e . RAD EB and Pulsar Missiles.

This is the original 1_new_cinema_mode_ai. It is the standard code.

Code: [Select]
MACHINE "AI"

STATE battle

RULE event In
:action

m.mainTarget0:=0;
m.mainTarget0:=1;
localEvent(StartAutoCamera, 0);

timer(StopAutoCamera, 600, 0);

SelectShips(20, s.race=#race_spacetech);
if(AllNumOf(20)>0, m.team1_leader:=Pick(20), ChangeState(noTeam1,0));

ExecList(20,
MakeFullyKnown(s.this);
FreezeReconState(s.this, #race_player, 1);
FreezeReconState(s.this, #race_Player, 1);
);

SelectShips(10, s.race=#race_player);

if(AllNumOf(20)>0, m.team0_leader:=Pick(10), ChangeState(noTeam0,0));
ExecList(10,
MakeFullyKnown(s.this);
FreezeReconState(s.this, #race_spacetech, 1);
FreezeReconState(s.this, #race_Player, 1);
);
m.mainTarget:=Pick(10);

//GuiSelect(3);

LocalEvent(GetTarget0);
LocalEvent(GetTarget1);
Delay(0,5,LocalEvent(Tick),0);
:end
END

RULE event GetTarget1
condition isValid(m.team1_leader)
:action
SelectShips(10, s.race=#race_player);
if(AllNumOf(10)>0, m.mainTarget1:=PickMax(10, 1 / distance(s.this, m.team1_leader)), ChangeState(noTeam0,0));

LocalEvent(FireTo1);
:end
END

RULE event GetTarget0
condition isValid(m.team0_leader)
:action
SelectShips(20, s.race=#race_spacetech);
if(AllNumOf(20)>0, m.mainTarget0:=PickMax(20, 1 / distance(s.this, m.team0_leader)), ChangeState(noTeam1,0));

LocalEvent(FireTo0);
:end
END


RULE event FireTo1
:action
if(isValid(m.team1_leader)&isValid(m.mainTarget1),
SelectShips(20, s.race=#race_spacetech);
ExecList(20,
s.this:tClearFire;
s.this:tMoveTo(m.mainTarget,1,0);
s.this:tFireTo(m.maintarget,1);
),
LocalEvent(FatalDamaged, E.ship=m.team1_leader)
);
:end
END

RULE event FireTo0
:action
if(isValid(m.team0_leader)&isValid(m.mainTarget0),
SelectShips(10, s.race=#race_player);
ExecList(10,
s.this:tClearFire;
s.this:tMoveTo(m.mainTarget0,1,0);
s.this:tFireTo(m.maintarget0,1);
),
LocalEvent(FatalDamaged, E.ship=m.team0_leader)
);
:end
END

RULE event ShieldDown
condition E.Ship:race=#race_player
:action
if(isValid(m.team1_leader)&isValid(E.ship),
SelectShips(20, s.race=#race_spacetech);
ExecList(20,
//s.this:tClearFire;
//s.this:tMoveTo(E.Ship,2,0);
s.this:tFireTo(E.Ship,2);
);
);
:end
END

RULE event ShieldDown
condition E.Ship:race=#race_spacetech
:action
if(isValid(m.team0_leader)&isValid(E.ship),
SelectShips(20, s.race=#race_player);
ExecList(20,
//s.this:tClearFire;
//s.this:tMoveTo(E.Ship,2,0);
s.this:tFireTo(E.Ship,2);
);
);
:end
END

RULE event FatalDamaged
condition E.ship=m.team1_leader;
:action
SelectShips(20, s.race=#race_spacetech);
if(AllNumOf(20)>0, m.team1_leader:=Pick(20), ChangeState(noTeam1,0));

LocalEvent(GetTarget1);
:end
END

RULE event FatalDamaged
condition E.ship=m.team0_leader;
:action
SelectShips(10, s.race=#race_player);
if(AllNumOf(10)>0, m.team0_leader:=Pick(10), ChangeState(noTeam0,0));

LocalEvent(GetTarget0);
:end
END

RULE event FatalDamaged
:action
if(E.ship=m.mainTarget0,
SelectShips(10, s.race=#race_player);
if(AllNumOf(10)>0, m.mainTarget:=Pick(10), ChangeState(noTeam1,0));
LocalEvent(GetTarget0);
);

if(E.ship=m.mainTarget1,
SelectShips(20, s.race=#race_spacetech);
if(AllNumOf(20)>0, m.mainTarget:=Pick(20), ChangeState(noTeam0,0));
LocalEvent(GetTarget1);
);

:end
END

RULE event StartAutoCamera
:action
guiSelect(0);
auto_camera := 1;
camGoRound(1);
timer(auto_ChangeView, 1, 0);
:end
END

RULE event StopAutoCamera
:action
auto_camera := 0;
auto_fatalship := 0;
camGoRound(2);
guiSelect(3);
uQuitMission(1);
:end
END

RULE event auto_ChangeView
condition auto_camera
:action
clearTimer(auto_ChangeView);
clearTimer(auto_camShift);

select(0, S.ship & S.damage<90);
sh := pick(0);

if (auto_fatalship,
enem := auto_fatalship;
auto_camdur := 15
,
if (select(1, S.ship & S.damage<90 & (isShot(sh, S.this) | isShot(S.this, sh)))=0,
select(1, S.ship & S.damage<90),
0);
enem := pick(1);
Debug("enem is ", enem);
enem:selected := 1;
auto_camdur := rnd(5,12));

camMoveAndTurn(sh, rnd(1,4)*sh:radius, enem, rnd(-30,30), 3);
timer(auto_CamShift, 3, 0);

if (tripleHead()=2,
tripm := if(rnd()<0.5, 1, 0);
camTripleMode(tripm);
triprnd := if(tripm=0,0.5,0.8)
,
triprnd := 0.2);

if (auto_fatalship=0 & rnd()<triprnd,
if (camViewedBoat(),
0,
if (select(2, S.bomber),
camWeaponView(pick(2):launcherweapon),
0))
,
0);

auto_fatalship := 0;
:end
END

RULE event auto_CamShift
condition auto_camera
:action
camShift(rnd(-30,30), rnd(-30,30), 0, 1.3*auto_camdur);
timer(auto_ChangeView, auto_camdur, 0);
:end
END

RULE event Exploding
condition auto_camera
:action
auto_fatalship := E.ship;
localEvent(auto_ChangeView, 0);
:end
END

END //STATE battle

STATE noTeam1

RULE event In
:action
:end
END

END //STATE noTeam1

STATE noTeam0

RULE event In
:action
:end
END

END //STATE noTeam1

END //MACHINE "AI"

What i did was.
I made extacly the same setup of ships, but in the default mode in the Skirmisher.
And then first copy-pasted the event firemissile from the 1_default_ai:

Code: [Select]
RULE event FireMissile
:action
Debug("FireMissile");
if(isValid(m.AITeam_leader)&Not(m.AITeam_leader:wreck)&IsValid(m.mainTarget)&Not(m.mainTarget:wreck),
AIFleetL5:=GetFreeSel();
SelectShips(AIFleetL5, s.race=#race_spacetech);
ExecList(AIFleetL5,
s.this:tClearFire;
s.this:tSetForbid(#FORBID_FIRE_MISSILE);  //we don't want AI to mess with it
AIMissileL:=GetFreeSel();
SelectDevices(AIMissileL, s.this, s.weapon & s.working & InSet(s.this, 5) & s.count!=0); //missiles & e-bombs
ExecList(AIMissileL,
s.this:contFire:=1; //burst missile fire
ActivateDevice(S.this, 1);
TargetWeapon(S.this, m.mainTarget);
);
DeleteSelect(AIMissileL);
);
DeleteSelect(AIFleetL5);
,
LocalEvent(FatalDamaged);
);
:end
END

After that i then adjusted the parameters like so:

Code: [Select]
MACHINE "AI"

STATE battle

RULE event In
:action

m.mainTarget0:=0;
m.mainTarget0:=1;
localEvent(StartAutoCamera, 0);

timer(StopAutoCamera, 600, 0);

SelectShips(20, s.race=#race_spacetech);
if(AllNumOf(20)>0, m.team1_leader:=Pick(20), ChangeState(noTeam1,0));

ExecList(20,
MakeFullyKnown(s.this);
FreezeReconState(s.this, #race_player, 1);
FreezeReconState(s.this, #race_Player, 1);
);

SelectShips(10, s.race=#race_player);

if(AllNumOf(20)>0, m.team0_leader:=Pick(10), ChangeState(noTeam0,0));
ExecList(10,
MakeFullyKnown(s.this);
FreezeReconState(s.this, #race_spacetech, 1);
FreezeReconState(s.this, #race_Player, 1);
);
m.mainTarget:=Pick(10);

//GuiSelect(3);

LocalEvent(GetTarget0);
LocalEvent(GetTarget1);
Delay(0,5,LocalEvent(Tick),0);
:end
END

RULE event GetTarget1
condition isValid(m.team1_leader)
:action
SelectShips(10, s.race=#race_player);
if(AllNumOf(10)>0, m.mainTarget1:=PickMax(10, 1 / distance(s.this, m.team1_leader)), ChangeState(noTeam0,0));

LocalEvent(FireTo1);
:end
END

RULE event GetTarget0
condition isValid(m.team0_leader)
:action
SelectShips(20, s.race=#race_spacetech);
if(AllNumOf(20)>0, m.mainTarget0:=PickMax(20, 1 / distance(s.this, m.team0_leader)), ChangeState(noTeam1,0));

LocalEvent(FireTo0);
:end
END


RULE event FireTo1
:action
if(isValid(m.team1_leader)&isValid(m.mainTarget1),
SelectShips(20, s.race=#race_spacetech);
ExecList(20,
s.this:tClearFire;
s.this:tMoveTo(m.mainTarget,1,0);
s.this:tFireTo(m.maintarget,1);
),
LocalEvent(FatalDamaged, E.ship=m.team1_leader)
);
:end
END

RULE event FireTo0
:action
if(isValid(m.team0_leader)&isValid(m.mainTarget0),
SelectShips(10, s.race=#race_player);
ExecList(10,
s.this:tClearFire;
s.this:tMoveTo(m.mainTarget0,1,0);
s.this:tFireTo(m.maintarget0,1);
),
LocalEvent(FatalDamaged, E.ship=m.team0_leader)
);
:end
END

RULE event FireMissile
:action
Debug("FireMissile");
if(isValid(m.team1_leader)&isValid(m.mainTarget1),
SelectShips(20, s.race=#race_spacetech);
ExecList(20,
s.this:tClearFire;
s.this:tSetForbid(#FORBID_FIRE_MISSILE);  //we don't want AI to mess with it
AIMissileL:=GetFreeSel();
SelectDevices(AIMissileL, s.this, s.weapon & s.working & InSet(s.this, 5) & s.count!=0); //missiles & e-bombs
ExecList(AIMissileL,
s.this:contFire:=1; //burst missile fire
ActivateDevice(S.this, 1);
TargetWeapon(S.this, m.mainTarget);
);
DeleteSelect(AIMissileL);
);
DeleteSelect(ExecList(20,);
,
LocalEvent(FatalDamaged);
);
:end
END

RULE event FireMissile
:action
Debug("FireMissile");
if(isValid(m.team0_leader)&isValid(m.mainTarget0),
SelectShips(10, s.race=#race_player);
ExecList(10,
s.this:tClearFire;
s.this:tSetForbid(#FORBID_FIRE_MISSILE);  //we don't want AI to mess with it
AIMissileL:=GetFreeSel();
SelectDevices(AIMissileL, s.this, s.weapon & s.working & InSet(s.this, 5) & s.count!=0); //missiles & e-bombs
ExecList(AIMissileL,
s.this:contFire:=1; //burst missile fire
ActivateDevice(S.this, 1);
TargetWeapon(S.this, m.mainTarget);
);
DeleteSelect(AIMissileL);
);
DeleteSelect(ExecList(10);
,
LocalEvent(FatalDamaged);
);
:end
END

RULE event ShieldDown
condition E.Ship:race=#race_player
:action
if(isValid(m.team1_leader)&isValid(E.ship),
SelectShips(20, s.race=#race_spacetech);
ExecList(20,
//s.this:tClearFire;
//s.this:tMoveTo(E.Ship,2,0);
s.this:tFireTo(E.Ship,2);
);
);
:end
END

RULE event ShieldDown
condition E.Ship:race=#race_spacetech
:action
if(isValid(m.team0_leader)&isValid(E.ship),
SelectShips(20, s.race=#race_player);
ExecList(20,
//s.this:tClearFire;
//s.this:tMoveTo(E.Ship,2,0);
s.this:tFireTo(E.Ship,2);
);
);
:end
END

RULE event FatalDamaged
condition E.ship=m.team1_leader;
:action
SelectShips(20, s.race=#race_spacetech);
if(AllNumOf(20)>0, m.team1_leader:=Pick(20), ChangeState(noTeam1,0));

LocalEvent(GetTarget1);
:end
END

RULE event FatalDamaged
condition E.ship=m.team0_leader;
:action
SelectShips(10, s.race=#race_player);
if(AllNumOf(10)>0, m.team0_leader:=Pick(10), ChangeState(noTeam0,0));

LocalEvent(GetTarget0);
:end
END

RULE event FatalDamaged
:action
if(E.ship=m.mainTarget0,
SelectShips(10, s.race=#race_player);
if(AllNumOf(10)>0, m.mainTarget:=Pick(10), ChangeState(noTeam1,0));
LocalEvent(GetTarget0);
);

if(E.ship=m.mainTarget1,
SelectShips(20, s.race=#race_spacetech);
if(AllNumOf(20)>0, m.mainTarget:=Pick(20), ChangeState(noTeam0,0));
LocalEvent(GetTarget1);
);

:end
END


But there's no change. I've tried a number of other changes including, the" tClearForbid(#FORBID_FIRE) clears all of the FIRE inhibitions".
Described in page 99 of the manual;

>   obj:tClearForbid(flags);
It deletes the given inhibition(s), and leaves the rest unchanged. The delete is hierarchic, that is, e.g. tClearForbid(#FORBID_FIRE) clears all of the FIRE inhibitions, or e.g. the FORBID_MOTION_MOTIVATION clears the CLOSE and AWAY inhibitions too. If the flags is 0, it deletes all the inhibitions.

I am a complete scripting noob so it might also just be rubbish. ::)

2
Game Assets / station size
« on: July 16, 2011, 13:50:16 »
I've made a combat station which is very large in size. In tactisype
 SHIPCLASS 180
   Name "cls_stat_CombatStation"     
SHIPTYPE 108
   Name "styp_ep4_human_modul_Station"

But the enemy ships stay out of weapons range around 20K and they do not attack.

I have put RangeBehav 2 2, to try to solve it. But it didn't work

I gave it another class > ballteship with velocity 0. But the same problem.

Is there a way to let the ships battle as usuall?
Or is this a limit in Nexus.
I've looked at a thread:
http://arparso.de/nexus/forum/index.php/topic,139.0.html

But do not know if his is the real answer to this subject.

Can the ships come closer to the stations? So change the parameters of the ships?
Another way is to extend the range of the weapons of the station?

I've looked at the manual as well but can't find a solution.

3
Game Assets / converting model
« on: July 15, 2011, 21:03:14 »
Hi,
Does anyone knows what it means that a model can't be viewed in the Model viewer?

I get this message:

In Model Viewer:

Could not load object.lwo

In Model/Texture Converter:

*****Access violation at adress 100076DA in module 'lwolib.dll'.Read of adress 07F51018

Any idea?

4
Game Assets / Mirror an object
« on: July 13, 2011, 22:33:29 »
Hi,
Does someone knows how to flip an object in Lightwave from left to right?
Along the Z-axis.

5
General Discussion / cinema mode
« on: July 12, 2011, 22:47:17 »
Hi there,
I have a few questions;

1.Is there a difference between the cinema_mode and the new_cinema _mode. I've tried them both a few times, but i couldn't find a difference.

2. Is there a way to extend the duration of the cinema mode?
It ends after 10 minutes. Can it be extended?

(3. In the previous tread, there was talk about a new skirmisher and there where some great and well known suggestions. How does it comes along?)

Thanks again Arparso.The skirmisher is a fantastisc tool.

6
Game Assets / new ship
« on: April 06, 2011, 00:28:18 »
Hi,
I've put a new ship in my mod.
But then a prevoius ship which i've put 3 day's before that doesn't work anymore.
In fact the whole mod doesn't work anymore wtih any of the original ships.
Even if i remove the two new ships.

I get this message




Line 260 is exactly the same as the original shipclass i.e.  Cruiser. There's no difference.

I've tried evrything already.
Replacing the old tactics.ini file with a new one and removing and putting every ship i have back in the tactics.ini file.
Because there is where i think the problem must be. I've even removed the mod from the register.
I can't think of anything else.
Does someone knows what the heck is wrong? :(

7
Game Assets / Adding hardpoints to ship model
« on: March 20, 2011, 12:15:15 »
Hi guys, i am very sorry to bother you again. :-[
I tried the whole day yesterday to add hardpoints to a ship model in Lightwave.
In the manual, 2.2 Game Parameters says;
#blink# to place flashing lights.....etc.
I have tried in Lightwave with: Add Luxigons, but no light in the model viewer or when converterd in the mod.
The syntax can be added via: Add Powergon, but then my knowledge ends, how the syntax / script should look like in the command window.
I have tried numerous variations and serached the web for answers, but without luck. :(

So, can someone please help me with this item?
I know it is a basic moding subject, but i am brand new to this area so any help would be greatly appreciated.

8
Game Assets / Coverting ships
« on: March 17, 2011, 16:54:40 »
Hi according to the modding manual you need to create a working folder \_work and put all the source files containing model, texture and parameter files to be converted to for the game are placed here.
Including; converter.tpr – Data-file of the converter.
However i can not find it anywhere. In the mod tools folder there is the converter  .exe  and 2 .dll files.

I have used the Nexus Skirmisher  SP Settings as a template and created a folder in the mods folder:
so: C\Program Files\Nexus - The Jupiter Incident\mods\new mod
In new mod  there are the files of Nexus Skirmisher SP Settings (because i also used this for my prevoius question).
Do i have to make a _work folder in the main new mod folder? Or do i have to make sub directories as well because in the manual in Chapter 2 they state that the models must be placed in the _work/art/meshes directory and that all models must include the following subdirectories.
-obj -textures

I know that the destination folder of the converted models should be in the main new mod folder  \meshes
and \ textures \meshes. That i do understand.
I know how the basic structure of a mod should be.
What confuses me is how to actually convert a .lwo and .tga to a .msh and .tex

I have tried different combinations but without reslut.

I have read the tutorials on moddb, nexus wiki, of the old dragon etc, done about 6,5 hours of research today but i am still stuck in the mud. :(

Summary:
1. where is; the converter.tpr – Data-file of the converter
2. how should the directory structure be to convert the a .lwo and .tga to a .msh and .tex

Thanks in advance.

9
Game Assets / Mod/tactitics
« on: March 10, 2011, 19:32:02 »
Hi, after finishing the game i urge for more.
I have started with making new models in a 3D program, but it will take some time before mastering that.
So i want to start with the models you guy's have already made.
I've read the Nexus modding manual, the nexus mod site and this site to get up to speed with the internals of modding nexus.

I want to use this http://www.dogsquad.co.uk/nexus/nexusmod.htm

Question:
1.What exactly is the sequence of editing the texts/tactics/tacticstypes.ini.
Do i have to go use the mod_tools/docs/Nexus tactict.xls file?
Or  do i have to edit it directly in the tacticstypes.ini in the universe map?
And do i then have to change every item of the ship class.

2. For now i only want to try the models out in single missions.
And wanted to use the Nexus Skirmisher for that,
but there aren't  meshes directory or textures/meshes directory.
So i guess that i have to put the files in the main nexus folder
or a mod if i wanted to use the Nexus Skirmisher.

3. In what way could the tacticsTool 2.2 help me with all this?
And do i have to use the mission editor for using the new ships?

4. When i want to use for eg the Hellstorm Hauler i can't find the corresponding
.TEX file in the textures (.TEX files) (10MB). Am i missing something here? 

Finally

5. Did someone already done editing the texts/tactics/tacticstypes.ini
so i could only copy / paste?

Thanks ;)





10
Help / Technical Support / the mechanoid crash
« on: February 21, 2011, 22:41:33 »
Hi Guys,
I am now at the mechanoid level. But it crashes continously. What must i do?

 >:( :( :'(

11
Help / Technical Support / Can not even start.
« on: February 17, 2011, 21:02:54 »
Hi,
I just bought the game from amazon.uk.
After installing the game form the cd 1 and cd 2 i have patched it with the 1.01 patch.
When i want to start the game i get the message:Cannot locate the CD-ROM. Please insert the correct

CD-ROM, select OK and restart.

I have inserted both the CD 1 and CD 2, but it didn't work.
Tried the compatibility mode, win xp sp 2.

See compatibility mode for older programs to run win win 7 but using older windows as win xp.

(google)

http://www.sevenforums.com/tutorials/316-compatibility-mode.html

Did not work either.

System specs: Win 7 ultimate, 64 bit, 6 gb ram, HD 4890.


I have searched the web for a sollution, alas without reslut.

Please help, any suggestions. Really want to play this game.     

Pages: [1]