Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
MEGALODONJC

Registered:
Posts: 18
Reply with quote  #1 
Hi there just wondering is there a way to set variables for all the terrain types mines asteroids nebulas planets and the values u need to enter like nebula count radius line or angle random range and beable to reset the values to 0 so that if a script would call for a ship spawn it would recalculate xz coordinates when a ship was needed.

Also another curiousity is it possible to spawn ships if an event is triggered by timer or other way to almost appear as if it decloaks within weapons range and catch the player ship off guard... aka surprise attack scenario.

Would appreciate some detailed insight if possible please. Also is there a mission editor doc still in 2.4 i may need to consult that.

Re Elites or ship types to give variety if i put in race id or type will it randomly choose one of the ships randomly?

Also how to tell a script to assign a random elite trait to a ship.

Fleets and fleet counts. I have noticed that if there are alot of ships in the game it taxes the server like crazy especially with tng mod which is more intensive. How would I go about creating an event which will limit the number of ships in a sector fleets and individual ships so that it would stop spawning or shut off a timer to spawn a ship if that number is reached then restart the timer wjen that value is under the max limit.

Sorry for all these questions but i would really appreciate some help with this please.
Thank you community
Admiral Chapman out
Founder Parry Sound Sector fleet
ryleyra

Registered:
Posts: 3,007
Reply with quote  #2 
Take a look at this post: https://artemis.forumchitchat.com/post/new-and-improved-sector-generator-7586807?pid=1288712469

It's a random sector generator, based on a script I used when I created a mod that added fighters to the game, prior to 2.4. Basically, it uses the script to randomly spawn and place each feature in the sector. There's no real way to do that automatically, but you can basically take my code, and then tweak it to create the kind of sector or mission you want to create.

It should be possible to trigger the spawn of enemy ships off of an event. The spawn is controlled by a flag variable that is automatically set once the terrain features are generated. So all you would have to do is remove the part where that variable is set, and then set it when the event happens.

This will require some knowledge of mission scripting, though. It should be easier to make simple changes to the script, but the level of changes you can make will depend on your programming experience.

Note that basically the way the script works is that it uses a feature called "expression evaluation". In short, it generates a random set of coordinates, and creates one object or a fleet of ships at those coordinates. It then repeats that process until the entire sector is generated. This is different from most scripts, which generate the whole sector in one event, but the objects have to be in a static location.
Fish Evans

Registered:
Posts: 361
Reply with quote  #3 
any where you can put a whole number value you can simply refer to a variable name and it will input the value said variable is currently at.


<create count="2" type="mines" startX="posX" startY="posY" startZ="posZ" radius="rad" randomRange="range" randomSeed="seed" />


yes, create the enemy then move using the relitive position command it next to imposible to lay out mines or nebulars on a track- it has been done but the code is ineligent and some what slow to perform.


<event id_arme="4e429b5f-bb16-4427-9705-88753c195d8f">
  <if_variable name="suprise" comparator="EQUALS" value="1.0" />
  <set_variable name="randangle" randomIntLow="0" randomIntHigh="359" />
  <set_variable name="fleetN" value="fleetN+1" />
  <create type="enemy" x="5000.0" y="0.0" z="5000.0" angle="10" name="Big Suprise" raceKeys="Skaraan" hullKeys="small medium large" fleetnumber="fleetN" />
  <set_relative_position name2="Big Suprise" distance="800" angle="randangle" name1="Artemis" />
  <set_variable name="suprise" value="2.0" />
</event>


The above will spawn one of the three skarann ships when ever the variable suprise is equal to 1 note taht the script changes the suprise value to 2 after its done - this is to stop it looping and spawning a skaren on every script cycle. Special abilitys are automaticly randomly given to "elite" type enemys.

look at the mission-file-docs.txt file in the artiemis base directory  for detials on all the commands.

its a hell of a lot simpler to use the mission editor though, especialy if your new to scripting

MEGALODONJC

Registered:
Posts: 18
Reply with quote  #4 
Thank you very much for your insight will try and assimilate all this info and see if i can make it work.
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.