Official 1C Company forum

Official 1C Company forum (http://forum.1cpublishing.eu/index.php)
-   Star Wolves (http://forum.1cpublishing.eu/forumdisplay.php?f=138)
-   -   Random Contacts (http://forum.1cpublishing.eu/showthread.php?t=14176)

Nanaki 04-01-2010 03:15 PM

Random Contacts
 
FOR THOSE WHO WANT TO DOWNLOAD THE FLEET MOD
Edit: Updated to version .04

There are quite a few important files that you must go through in order to understand this script. These are the Randomcontacts.script, the create_flight_2.script, and the activate.script (located in each and every sector)

The Randomcontacts.script is highly interwoven with the create_flight_2.script, so if I say something without elaborating, chances are I am talking something in create_flight_2.

I have been doing a lot of researching of Random contacts as of late. My first initial expeirments consisted of merely doubling the number of random contacts (in order to better understand how they work) and adding KFNI patrols in certain MSF Systems. Both of these experiments have been successes (Well, adding the KFNI did not produce the desired results, oh well), and my study of the Randomcontacts script has yielded results.

Random contacts are -always- fighters, there is not even infestructure set in place for random contact bombers or capital ships (Although it should not be too difficult to set up). The only exception to the rule is trader flights, which consist of mixed capital ships (transports) and fighters.

Random contacts also have a 'strength' modifier. The strength modifier is different from the power modifier, in that it goes through a special script that generates a random number from the strength modifier, which than becomes the power modifier. The degree of randomization can be anywhere from Strength minus 4, to Strength plus 3. So a Random contact with a strength of 17 can generate flights with power levels as high as 20, and as low as 13.

Another thing that is important is Portals. Each randomcontact has a list of portals that they will enter and exit. They will ignore all other portals.

When Random contacts enter a sector, they have a specific set of waypoints that they must follow, and once they reach all the waypoints, they will than head to a portal and exit the sector.

Finally, there is a probability modifier. To better understand this, one must go to this little tidbit:
StartRandomContacts(80, 60);

All sectors with random contacts have this. It basically tells the random contacts to start. The first number is the initial interval, in which case, the game will wait 80 seconds before triggering the first spawn of random contacts.

The second number is all intervals after that. After the initial 80 seconds, it will call a spawn every 60 seconds. The 'probability' part of each registered random contact is the probability of that random contact spawning.

I know this might seem like cutting it short, but it is all I have for now. I have several goals I am considering going after, including:

1: Adding military convoys. These transport convoys will be carrying mainly weapons, equipment, and ships. Probably the easiest, since I can use the Trader code as a guideline.

2: Adding fleets.

3: Adding more conflict.

tsavo 04-01-2010 03:49 PM

playing the second time,
run into a 5k hunting mission in the first session,
and a 10k hunting mission this time

in general, this piece of universi is tooooo quiet, is there any way to make a lot of noises(conversions) out of docking direction, rejection and confirmation; discover of enemy; call for help; priate's demand; and so on?

i do love to have a much more interactive space.

Nanaki 04-01-2010 04:48 PM

Can I get the actions? Yeah. But the dialogue on top of that? Nope. All of the dialogue files seems to be under some kind of wierd encryption that I do not understand. It seems to be hex-based, but directly converting it to ascii has gone nowhere for me.

Goblin Wizard 04-01-2010 06:44 PM

Dialog files that use coding have header "FILETYPE DYNAMIC". If you change it to "FILETYPE STANDART" you can write plain text messages. Of course, if you change existing coded dialog to STANDART you must copy all dialog options from the game and retype them, otherwise, you will see that strange sequences of signs in the game . That's why I've made new dialog files for my motherships buying script.

Rastix 04-01-2010 09:24 PM

Quote:

Originally Posted by Nanaki (Post 152767)
All of the dialogue files seems to be under some kind of wierd encryption that I do not understand. It seems to be hex-based, but directly converting it to ascii has gone nowhere for me.

New header "FILETYPE MODDING" will help you ;)

Quote:

Originally Posted by Goblin Wizard (Post 152782)
Dialog files that use coding have header "FILETYPE DYNAMIC". If you change it to "FILETYPE STANDART" you can write plain text messages. Of course, if you change existing coded dialog to STANDART you must copy all dialog options from the game and retype them, otherwise, you will see that strange sequences of signs in the game . That's why I've made new dialog files for my motherships buying script.


"FILETYPE STANDART" wouldn't work properly with "active dialogs" tasks

Goblin Wizard 04-01-2010 10:17 PM

Thanks a lot! I was thinking why some of the dialogs work but others not. I wonder if you know another useful tricks?

tsavo 04-02-2010 01:42 AM

so there is no way to add some sound file to make the space more "human"?

Nanaki 04-02-2010 01:56 AM

http://img31.imageshack.us/img31/6814/starwolves7.jpg

Well, Mediocre success. I managed to fully impliment Pirate military convoys, however, my original plan called for the military convoys to be divided into four tiers, starting off with the rookie stuff and eventually ending with very high-quality gear (well, for pirates), with the level of escort determined by the quality of the goods inside the transports.

However, RandomContacts really, really, -really- dislikes tiered systems, and unless I modify large sections of randomcontacts.script (which I am not comfortable enough with Lua to do). On top of this, I had difficulty getting any of my scripts to work properly. They would properly add modules to a ship's inventory, but for some odd reason they would not add ships despite having the correct function.

I eventually gave up, and decided to modify the already-existing FillTraderSimple function to my needs. It works, quite well actually, but it means that the tiered system I originally planned for is gone (Although it works with randomcontacts now), thus all Pirate convoys are rather heavily guarded with Third and Fourth generation ships.

The only thing that is left is to clean up the mess I made a little, and impliment convoy fleets for all the major factions, and than modify all the location scripts so that they spawn.

So far, I only plan on introducing USS, Triada, Inoco, Patrol, Pirate, Old Empire, and New Empire convoy fleets (the remaining factions are too small to bother with). Convoys will be heavily defended, Pirate and Patrol convoys will have mainly third and fourth generation ships (mainly because neither faction has any fifth generation ships), while the rest will have fourth and fifth generation ships guarding them (corporates would be more fourth-generation heavy, while both Old and New Empires would be heavier on fifth generation). Loot inside the transports is randomized, and can be anywhere from First generation to fifth generation, weapons are randomized the same way.

Convoys will be mainly located in systems where the faction in question has a strong presence, mainly to prevent the situation of free loot coming about because an MSF fleet stumbled upon a New Empire convoy.

Ultimately, the reason why I implimented them is that I wanted to give the player more ways to acquire fighter hulls other than either buying them, or attacking a faction's warehouse for them. If you do not like a faction, you are free to whack their convoys for free ships and loot, and even law-abiding neutral citizens can join in the fun by whacking pirate convoys (Although Pirates and Imperial Patrols generally have lesser loot, you wont ever find any fifth generation ships)...

I am considering adding an SOS system for Military convoys, but that might be thinking too far ahead.

Rastix 04-02-2010 09:21 AM

Quote:

Originally Posted by Goblin Wizard (Post 152805)
Thanks a lot! I was thinking why some of the dialogs work but others not. I wonder if you know another useful tricks?

what tricks do you want to know? ;)

Quote:

Originally Posted by tsavo (Post 152818)
so there is no way to add some sound file to make the space more "human"?

explain yourself please :)

tsavo 04-02-2010 03:25 PM

Quote:

Originally Posted by Rastix (Post 152849)
what tricks do you want to know? ;)



explain yourself please :)

that is, to find a way adding radio comm sound file to docking procedure
say, if ok, u will hear a vioce "please go to docking bay 7"
if not, then u might hear "docking request denied", or what ever it suits the situation.

:rolleyes:


All times are GMT. The time now is 01:18 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright © 2007 1C Company. All rights reserved.