Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official Fulqrum Publishing forum > Fulqrum Publishing > Star Wolves

Star Wolves 3D space RPG with deep strategy and tactical elements

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #27  
Old 02-12-2015, 03:17 PM
Lotrek Lotrek is offline
Approved Member
 
Join Date: Jan 2012
Posts: 312
Default

I've gone through GW's original script and the GW script you have in your version and I can see no difference with the GK turrets. I know in the previous version I was able to buy them.

Here is the snippet from Data\Scripts\include\GW that I am referring to:

--------------------------------------------------------------------------------
---- Buy MS EQUIPMENT section --------------------------------------------------
--------------------------------------------------------------------------------

function buy_THGK3()
buy_ms_eq("THGK3");
end;

function buy_TLGK3()
buy_ms_eq("TLGK3");
end;

function buy_TPGK3()
buy_ms_eq("TPGK3");
end;

function buy_TRGK3()
buy_ms_eq("TRGK3");
end;


function buy_ms_eq(eq_name)
local tab_ms_eq = {
{"THGK3",350000},
{"TLGK3",350000},
{"TPGK3",350000},
{"TRGK3",350000}
};

local cost = 0;
for k, x in tab_ms_eq do
if (x[1] == eq_name) then
cost = x[2];
end;
end;
if (cost == 0) then return FALSE;
end;

local cash = GetPlayerCredits();
if (cash >= cost) then
mothership:AddModuleToInventory(eq_name, 1);
SubPlayerCredits(cost);
OutputToScreenLog("#UI_item_buy_ok",7);
else
OutputToScreenLog("#UI_buy_fail",7);
end;
end;

I checked Data/Game/Modules and THGK3, TLGK3, TPGK3, TRGK3 are all there with complete parameters. All the referenced items are located in Data\TEXTURE\Interface\Module\32. As far as I can tell, the above script should work.

I looked at the script in your mod used to buy the MD-5 black hole Particle Accelerator under option 9 Star Equipment:

-- //////////////////////////// --
-- // Star Equipment Section // --
--//////////////////////////// --

function buy_RG4()
buy_ms_eq("RG4");
end;


function buy_ms_eq(eq_name)
local tab_ms_eq = {
{"RG4",75000},
};

local cost = 0;
for k, x in tab_ms_eq do
if (x[1] == eq_name) then
cost = x[2];
end;
end;
if (cost == 0) then return FALSE;
end;

local cash = GetPlayerCredits();
if (cash >= cost) then
mothership:AddModuleToInventory(eq_name, 1);
SubPlayerCredits(cost);
OutputToScreenLog("#UI_item_buy_ok",7);
else
OutputToScreenLog("#UI_buy_fail",7);
end;
end;

Comparing the two scripts they seem identical with the exception of the item they are to buy. The black hole script works, the GK turret one does not. I am at a loss as to why at this point since they seem to be the same code.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:17 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.