Fractal Softworks Forum

Please login or register.

Login with username, password and session length

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.

Topics - RawCode

Pages: 1 [2]
16
Probably it should have degraded engines, instead it have shielded cargo and civhull only.

Also, autofit option on that buffalo violate max OP of ship.

17
Bug Reports & Support / Possible AI issue related to "corona" effect
« on: December 20, 2015, 01:13:27 AM »
1) Fleets will chase player to the edge of "sun".
2) Fleets will not enter deep into corona and will wait player just outside.
3) Chasing fleets will sometimes enter inside corona effect and take some CR damage, then fleet change direction and leave corona.
4) Fighters with 3% CR regen will wear out in few days.
5) Highlevel officers and ships with "solar shielding" will allow player to keep CR on high level and then attack fleet with disabled fighters.
6) This attack especially effective vs carrier type fleets.

Issue is: AI should not "chase" players inside corona.

18
If on moment of XP gain no crew available CargoData.CrewXP object get permanently corrupted by NaN value and not more crew levelups ever occur.

This can happen in case of drone ships or everyone die in combat, eg, this issue possible in vanilla and extremely likely to happen in some mods (Uomoz\Neutrino).

This screenshot will explain everything:
Spoiler
[close]

19
Modding / Spotlight: Fairy, Modular Fleet, World War (WIP)
« on: March 16, 2013, 03:35:18 AM »
After extensive flamewar i wont judge mods any more, but this does not mean, that local community won, i will return to this part later.

Usefull links used in mod discovery process:

http://tieba.baidu.com/p/2124604852
http://tieba.baidu.com/p/2193290458
http://translate.google.com/translate?depth=1&hl=en&rurl=translate.google.co.uk&sl=auto&tl=en&u=http://tieba.baidu.com/f%3Ftp%3D0%26kw%3D%25D4%25B6%25D0%25D0%25D0%25C7%25BA%25C5

Links provided by Fairy mod author @sadlywish
http://pan.baidu.com/share/link?shareid=309717&uk=202946161
http://www.moddb.com/mods/yaodumod

Original download link found for World War (mod's author @xangle13)
http://tieba.baidu.com/p/2194817422

Modular fleet author local thread:
http://fractalsoftworks.com/forum/index.php?topic=5873

If you want to help xangle13 and sadlywish in translation, you shoud PM them directly.

DSTech Mod removed from thread since it's already have thread on this forum:
http://fractalsoftworks.com/forum/index.php?topic=2711.0
Not expected rage about this.


Fairy

This mod developed by sadlywish.
It's not vanilla balanced and marked as total conversion.
100% API done.

Main features are:
Nice music for loadscreen, neat sprites for hulls and weapons;

##

Core of gameplay is scripted missions:



World war
SPACE SUBMARINES BTW!!!
nono
WOODEN SPACE SUBMARINES!!!
still no
WOODEN SPACE SUBMARINES THAT SEND WORLD WAR 2 SPACE FIGHERS WITH PROPELLERS!!!111
ah yes fits perfectly!



This thread WIP, it will updated over time.

20
This is blackmagic (reflections) based mod (that does not call obfuscated core methods for now) to allow multiple CharacterCreationPluginImpl scripts to load it's data into memory without major side effects.

Current implementation is:

Spoiler
Code: java
package data.scripts.plugins;

import com.fs.starfarer.api.campaign.CargoAPI.CrewXPLevel;
import com.fs.starfarer.api.characters.CharacterCreationPlugin;
import com.fs.starfarer.api.characters.MutableCharacterStatsAPI;

import data.scripts.world.RawCodeGen;
import data.usc.uscData;

import java.io.PrintWriter;
import java.io.StringWriter;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import org.apache.log4j.Logger;

public class CharacterCreationPluginImpl implements CharacterCreationPlugin {

// externals block
@SuppressWarnings("rawtypes")
public static List _getResponses = new ArrayList();
public static int _stage = 0;
public static
HashMap<String,ResponseImpl> _ResponsePool   = new HashMap<String,ResponseImpl>();
Logger fun = Logger.getLogger(this.getClass());

public static class ResponseImpl implements Response {
private String text;

public ResponseImpl(String text) {
this.text = text;
}

public String getText() {
return text;
}
}

public void eventbussurrogate1() throws Exception{
Class test = Class.forName("data.scripts.plugins.CharacterCreationPluginImpl_1");
Method inv = test.getMethod("main", null);
Method tt  = test.getMethod("getResponses", null);

inv.invoke(null, null);
tt.invoke(null, null);
}

public void eventbussurrogate() throws Exception{
Class<?> test = Class.forName("data.scripts.plugins.CharacterCreationPluginImpl_0");
Method inv = test.getDeclaredMethod("main", null);
Method tt  = test.getDeclaredMethod("getResponses", null);
fun.info("sur 1");
inv.invoke(null, null);
tt.invoke(null, null);
fun.info("sur 2");
}

private String[] prompts = new String[] {"1","2","3","4"};

public String getPrompt() {
if (_stage < prompts.length) {
return prompts[_stage];
}
return null;
}

public List getResponses() {
_getResponses = new ArrayList();

fun.info("TEST 1");

try {
fun.info("TEST 2");
eventbussurrogate();
fun.info("TEST 3");
} catch (Exception e) {
fun.info("TEST 4");
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
e.printStackTrace(pw);
sw.toString();
fun.info(sw.toString()+ "FFFF");
fun.info("TEST 5");
}
try {
eventbussurrogate1();
} catch (Exception e) {
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
e.printStackTrace(pw);
sw.toString();
fun.info(sw.toString()+ "FFFF");
}

fun.info("SIZE OF ARRAY OUTSIDE " + _getResponses.size());

return _getResponses;
}

public void submit(Response response, CharacterCreationData data) {
_stage++;
}

public void startingShipPicked(String variantId, CharacterCreationData data) {
}
}
[close]

Surrogates implementation is:

Spoiler
Code: java
package data.scripts.plugins;

import com.fs.starfarer.api.campaign.CargoAPI.CrewXPLevel;
import com.fs.starfarer.api.characters.CharacterCreationPlugin;
import com.fs.starfarer.api.characters.CharacterCreationPlugin.CharacterCreationData;
import com.fs.starfarer.api.characters.CharacterCreationPlugin.Response;
import com.fs.starfarer.api.characters.MutableCharacterStatsAPI;

import data.scripts.plugins.CharacterCreationPluginImpl.ResponseImpl;
import data.usc.uscData;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import org.apache.log4j.Logger;

public class CharacterCreationPluginImpl_0 {
static Logger fun = Logger.getLogger("INVOKE");


@SuppressWarnings("unused")
public static void main(){
HashMap<String, ResponseImpl> _ResponsePool = CharacterCreationPluginImpl._ResponsePool;
fun.info("INSIDE 1");
_ResponsePool.put("LOL",new ResponseImpl(
"Served as a junior supply officer in an independent system's navy"));

_ResponsePool.put("LOL1",new ResponseImpl(
"Hired out as a gunner on a mercenary ship"));

_ResponsePool.put("LOL2",new ResponseImpl(
"Spent time as a co-pilot on a patrol ship in an independent system"));
fun.info("INSIDE 2");
}

public static void getResponses() {
List current = CharacterCreationPluginImpl._getResponses;
HashMap<String, ResponseImpl> _ResponsePool = CharacterCreationPluginImpl._ResponsePool;
fun.info("INSIDE 3");

fun.info("STAGE  " + CharacterCreationPluginImpl._stage);

switch (CharacterCreationPluginImpl._stage){
case 0:fun.info("case 1");
current.add(_ResponsePool.get("LOL")); break;
case 1:fun.info("case 2");
current.add(_ResponsePool.get("LOL1")); break;
case 2:fun.info("case 3");
current.add(_ResponsePool.get("LOL2")); break;
}
fun.info("INSIDE 4");

fun.info("SIZE OF ARRAY " + current.size());
}
}
[close]

Current version is proof of concept, a bit later (after few cups of coffe) i will try to implement class discovery method, that will search all suitable classes and load em.

Currently it able to load as many classes as needed as long as them follow CharacterCreationPluginImpl_NUMBER format.
I will cap number of attempts at 32 for now, soo every one will have nice chance to select free number and sucsessfuly load code.

NOTE it may fail on your machine due java.io limitation, PM me i will provide patch for this or remove any java.io calls (they used to log stacktraces only)


Edit: [code=java]  ~Trylo

21
Modding / Runtime object generation
« on: March 06, 2013, 09:52:05 PM »
Current API does not allow to generate gameplay objects in runtime, only from static files, BUT there is methods already to do it, in "obfuscated" core.

Will this change, or anyone who want to develop something really new (or just to overcome limits of API and modsupport design flaws) forced to violate TOS\EULA?

Yes i want runtime hulls with random color of texture and random features, weapons with random stats and hurge load of randomization everywhere to bring this game closer to "classical" RPGs with 100500 levels for every item "magical rocket launchers" and other funny stuff that will make endless grinding of weaker fleets more interesting.

Everything already possible but not added to API (or *well hidden* inside 257 chars long file names).

22
Suggestions / Autofire omni shields
« on: March 20, 2012, 02:59:29 AM »
Simple and effective - allow AI control omni shield to catch projectiles by it's own when player aim turrets.

Player still turn shield on and off, holding mouse button also override AI contol, tun on-off my shift + mouse.

23
Suggestions / Noninstant combats on world map
« on: March 19, 2012, 04:27:44 AM »
With ability to join random fight and choose your side (this also allow to change repuration).

Currently any fight on world map is completely instant, with non instant combats player will have change to get some easy practice-money shooting from backs of hehemony patrol and leaving without problems if took to much damage.

24
Suggestions / Nonorganic crew for T3 ships
« on: March 16, 2012, 09:02:06 AM »
Suggestion is simple, t3 ships (currently ships are lowtech and hightech, next tier is futuretec) with nonorganic crew allowed.

No new hulls reqired, ships like hyperion and paragon can be classified as t3 without any problems.

T3 ships shoud accumulate exp by it's own after every fight and nonorganic crew follow exp level of ship, nonorganics dont need life support and able to keep ship hull "alive" 100% of time if it's not scrapped by enemy after combat.
Fleet of T3 ships will never loose anything as long as not completely wiped in combat.

Suggestion also include more levels of crew:
Green
Trained
Regular
Veteran
Specialist
Expert
Elite
Godlike
with major effects on ship stats and smooth distribution of bonuses.

Also ships shoud have they own levels, regular crew on hightech ships will act like green (-2 tier penalty) and on futuretec ships expert crew reqired to get any bonuses.

Nonorganic crew also shoud have procs and cons, like crew casualties from EMP damage.

Pages: 1 [2]