Menu

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.

Show posts Menu

Messages - ai_enabled

#1006
Modding info / Re: Item/skill icon
July 20, 2017, 09:38:23 PM
Roboto for most text, Orbitron for headers, for some other cases Eurostile.
#1007
Try to set the price to 0.
#1008
After launching the server connect to it and look into the server log to see the stats (reported every few seconds). It will display how much milliseconds it takes for a frame. Usually the server run on 40 FPS so every update should not exceed 25 ms. And load increases nearly linearly if more star systems are active (populated with online players) simultaneously. So 10 players in 10 different systems might be overwhelming for described server hardware, but 10 players in up to 3-4 systems should be handled very smoothly.
#1009
One core, 1.6 GHz desktop-class Intel or AMD CPU (not Atom), 1 Gb - should be more than enough.
If IO is slow, world saving may take a few seconds.
Bottomline - almost any VM on Linux will be good.
#1010
There are no actual sections in the shop container - it simply contains items list. The sections are working as a simple filter on the client-side only - it knows all the items in the shop container but displays only those which belong to a selected section.
GetItemsAndCargo returns array of objects. Each object contains following fields:
int item_id
int quantity
string xml_id

Beware that cargo items are not usual items - they don't have ID's (always zero) - only xml_id and quantity. But that also helps to determine if item is cargo - just check if item_id == 0.
#1011
UPD. So it was parser which removed i in square brackets. Ok, next time use BB code for your code as I mentioned below.

Proper code:

// remove all system IDs from systemList which don't have any spacestations
for (var index = 0; index < systemList.length; index++)
{
     var systemId = systemList[index];
     var systemBases = game.GetSystemBases(systemId);
     if (systemBases.length == 0)
     {
         systemList.splice(index, 1);
         index--;
     }
}


(index-- is very important here: after splice it will point to the next element, but on the next iteration it will move even further - so you will skip next element in array after splicing it... index-- solves this)

BTW, please use the "code" BB tag when posting code snippets.
#1012
GetSystemBases() returns array.
In programming, if a method is expected to return an array, it must return an array even if it's empty. It could return null only in the case when it's explicitly mentioned about this in the method comment/description (but it's very rare and happens only if library highly optimized to reduce overhead as much as possible; usually it's cheap to return an empty array).

So it returns an empty array when there are no stations at the system. You need to simply check if the length of this array is zero.
#1013
Sure, I'm glad to help.
There is a good example of this function:
core\data\topics\fanatics\fanatics_quest_reputation.js
Line 362: var shop_container_id = items.GetStationShopContainerId(stationId);

(then an item added to this container).
#1014
I recommend using Notepad++ and its multi-file search feature (Ctrl+Shift+F, Find in files). Just configure it to search in the data folder and it will find you at least two usage examples of items.GetStationShopContainerId
#1015
Does it work properly now?
Why did it not work properly before? I guess you used wrong scope ("station." instead of "items.")?
#1016
items.GetStationShopContainerId(stationId)
- it should work fine.
#1017
Modding info / Re: Getting the name of Systems?
July 19, 2017, 01:11:12 AM
I'm glad you found it :-).
#1018
We have actively supported and regularly improved the game for two years after the release on Steam.
Only patches with fixes are planned (currently there are only a few small issues and it's not worth to release a patch).
We're focused on CryoFall now.
#1019
Modding info / Re: Adding to effect group
July 17, 2017, 11:44:04 PM
Right, it seems to be possible to add new effects by adding new XML file with these effects (effect_definitions_YOUR_MOD_NAME.xml might be a good idea).
But adding new effect group is not so easy as there is an only single file for all the groups - effect_groups.xml - it should be overridden completely...
#1020
Modding info / Re: Adding new skill tab
July 17, 2017, 09:40:56 PM
Acuru, it's unlikely that we will change this. Too many parts are tangled together so it's not simple to rewrite or extend skill categories without much headache for us and introducing unexpected issues (such as broken savegames or incorrect skill categories when connecting to a new server).