Автор |
Сообщение |
Goblin_Wizard
|
Заголовок сообщения: Re: Use English, please Добавлено: 20 авг 2010, 16:07 |
|
Зарегистрирован: 22 апр 2010, 00:29 Сообщений: 104
|
Good day everyone  After a while of silence I'm back to modding SW and have few questions: 1. How do you count gate jumps? Which functions do you use? I'd like to make something like salaries for pilots and i think it will be a good way to do it e.g some amount of cash every 10 jumps or so. 2. Is there any way to make to make armor boosters - systems which increase ship hit points? 3. What is the best way to permanently save structures after player leave the sector? I know about SetQuestLabel function but is there any other way? I think about building a player own HQ. Is not a big problem. Main problem is how to keep this base after player leave the sector.
|
|
 |
|
 |
Michael Moon
|
Заголовок сообщения: Re: Use English, please Добавлено: 20 авг 2010, 21:11 |
|
Зарегистрирован: 29 янв 2008, 22:49 Сообщений: 6701
|
Goblin_Wizard писал(а): Good day everyone  After a while of silence I'm back to modding SW and have few questions: Goblin, you ask such questions that demand big-big answers.  Цитата: 1. How do you count gate jumps? Which functions do you use? I'd like to make something like salaries for pilots and i think it will be a good way to do it e.g some amount of cash every 10 jumps or so. Whenever the person starts thinking about counting jums he can invent a good bunch of his own ideas. Just an example what I use in my scripts: function JumpCounter () local mothership = GetQuestLabel("TeamHaveMothership"); local JUMP_COUNT; if(mothership == "TRUE") then JUMP_COUNT = tonumber(GetQuestLabel("JUMP_COUNT")); JUMP_COUNT = JUMP_COUNT + 1; JUMP_COUNT = tostring (JUMP_COUNT); SetQuestLabel("TeamHaveMothership","TRUE"); else JUMP_COUNT = 0; JUMP_COUNT = tostring (JUMP_COUNT); end; return JUMP_COUNT; end;
-- Считаем ходы геймера function GetJumpCount() local JUMP_COUNT = JumpCounter () JUMP_COUNT = tostring (JUMP_COUNT); SetQuestLabel("JUMP_COUNT",JUMP_COUNT); end;
GetJumpCount();Цитата: 2. Is there any way to make to make armor boosters - systems which increase ship hit points? Yes. But the only way to use them is to go through the pilot's properties Цитата: 3. What is the best way to permanently save structures after player leave the sector? I know about SetQuestLabel function but is there any other way? I think about building a player own HQ. Is not a big problem. Main problem is how to keep this base after player leave the sector. Structures are permanently saved by themselves if you create them in so-called "location scripts", e.d. the scripts that are responsible for all objects in the location. Go to any location's folder and study the scripts a little bit more closely Regards, Sarge. 
_________________ Suum Quique
|
|
 |
|
 |
Goblin_Wizard
|
Заголовок сообщения: Re: Use English, please Добавлено: 20 авг 2010, 23:36 |
|
Зарегистрирован: 22 апр 2010, 00:29 Сообщений: 104
|
Thanks for the answers  and.. Michael Moon писал(а): Цитата: 2. Is there any way to make to make armor boosters - systems which increase ship hit points? Yes. But the only way to use them is to go through the pilot's properties You mean by perk that directly affects ship hp or perk which works when proper system is installed (if something like that is possible)? Michael Moon писал(а): Цитата: 3. What is the best way to permanently save structures after player leave the sector? I know about SetQuestLabel function but is there any other way? I think about building a player own HQ. Is not a big problem. Main problem is how to keep this base after player leave the sector. Structures are permanently saved by themselves if you create them in so-called "location scripts", e.d. the scripts that are responsible for all objects in the location. Go to any location's folder and study the scripts a little bit more closely It's all about structures which are not exist in location script. I want to let player build his own base wherever he want. I do this via summon perk which starts dialog. From the dialog player chooses a base module to build (module which he has in inventory). Module appears for example 50 clicks in front of the mothership. Player can set up his own trade station, maintenance station (which additionally can keeps his pilots, equipment, motherships etc.), turret platforms to defend the base and any other structures. The problem is to save structures and their positions after player leave the sector. Saving all these information via SetQuestLabel is really annoying. Do you know any other way to keep information through the entire game?
|
|
 |
|
 |
Michael Moon
|
Заголовок сообщения: Re: Use English, please Добавлено: 21 авг 2010, 07:33 |
|
Зарегистрирован: 29 янв 2008, 22:49 Сообщений: 6701
|
Goblin_Wizard писал(а): Thanks for the answers  and.. Michael Moon писал(а): Цитата: 2. Is there any way to make to make armor boosters - systems which increase ship hit points? Yes. But the only way to use them is to go through the pilot's properties You mean by perk that directly affects ship hp or perk which works when proper system is installed (if something like that is possible)? I mean that dirctly affect the ship's hp through specials (perk that work when the gamer starts them). I don't know any other way. Цитата: Do you know any other way to keep information through the entire game? No 
_________________ Suum Quique
|
|
 |
|
 |
Goblin_Wizard
|
Заголовок сообщения: Re: Use English, please Добавлено: 31 авг 2010, 17:35 |
|
Зарегистрирован: 22 апр 2010, 00:29 Сообщений: 104
|
Is there any way to remove learned perk from the pilot? or downgrade the level of summon perk?
|
|
 |
|
 |
Michael Moon
|
Заголовок сообщения: Re: Use English, please Добавлено: 31 авг 2010, 17:41 |
|
Зарегистрирован: 29 янв 2008, 22:49 Сообщений: 6701
|
Goblin_Wizard писал(а): Is there any way to remove learned perk from the pilot? or downgrade the level of summon perk? As far as I tried to do that - no way. Exept create a new pilot. "Zero downgrading" 
_________________ Suum Quique
|
|
 |
|
 |
Goblin_Wizard
|
Заголовок сообщения: Re: Use English, please Добавлено: 31 авг 2010, 20:30 |
|
Зарегистрирован: 22 апр 2010, 00:29 Сообщений: 104
|
Do you guys ever tried CreateModule or ship:AddModule functions? I can't get them to work. How to do it properly? For example: I have new, naked ship with empty slots (just created by CreateCarcass) and I want to give it a gun or any other module. I don't want to use the station menu but do it by the script. Any code examples will be warmly welcomed 
|
|
 |
|
 |
Michael Moon
|
Заголовок сообщения: Re: Use English, please Добавлено: 31 авг 2010, 21:33 |
|
Зарегистрирован: 29 янв 2008, 22:49 Сообщений: 6701
|
Goblin_Wizard писал(а): Do you guys ever tried CreateModule or ship:AddModule functions? I can't get them to work. How to do it properly? For example: I have new, naked ship with empty slots (just created by CreateCarcass) and I want to give it a gun or any other module. I don't want to use the station menu but do it by the script. Any code examples will be warmly welcomed  These commands are used to add something into the ships CARGO - not slots. The only way you can "add" something into the slot of a newly-created ship is to write all possible variants of that ship with filled slots in ShipDesription.xml and during the game change the empty ship for the variant you need.
_________________ Suum Quique
|
|
 |
|
 |
Goblin_Wizard
|
Заголовок сообщения: Re: Use English, please Добавлено: 01 сен 2010, 22:49 |
|
Зарегистрирован: 22 апр 2010, 00:29 Сообщений: 104
|
I've just made some testing with summoned ships. First, all summoned ships were Interceptors. They do just fine but they fly around losing time. So, I've changed the type of summoned ships to BigShip. Now they just go straight to the target and stop at minimum distance firing non-stop. The problem is, when all these ships chasing the same target, they don't care for each other at all. No collision detection for models. Not at all!! WTF? They make one big mess. I've been using 15 low hp drones (50hp). ALL except one exploded before they get to the target. Is it possible to change this catastrophic behavior somewhere?
|
|
 |
|
 |
Michael Moon
|
Заголовок сообщения: Re: Use English, please Добавлено: 01 сен 2010, 22:54 |
|
Зарегистрирован: 29 янв 2008, 22:49 Сообщений: 6701
|
Goblin_Wizard писал(а): I've just made some testing with summoned ships. First, all summoned ships were Interceptors. They do just fine but they fly around losing time. So, I've changed the type of summoned ships to BigShip. Now they just go straight to the target and stop at minimum distance firing non-stop. The problem is, when all these ships chasing the same target, they don't care for each other at all. No collision detection for models. Not at all!! WTF? They make one big mess. I've been using 15 low hp drones (50hp). ALL except one exploded before they get to the target. Is it possible to change this catastrophic behavior somewhere? Make one-two fligths instead of many and assign different roles for the ships. Try not to use the ships INDIVIDUALLY. That is the only advice I can give in this case.
_________________ Suum Quique
|
|
 |
|
 |
|