Multi-skinned races help?

Discuss and distribute tools and methods for modding. Moderator - Grognak
aczom
Posts: 7
Joined: Fri Oct 05, 2012 2:50 am

Multi-skinned races help?

Postby aczom » Fri Oct 05, 2012 7:30 am

So, I'm working on a mod right now that changes a lot of the things ingame, but I hit a snag with the alien races. As far as I know nobody has cracked the races yet so making a new one gives them the default 'human' powers (IE nothing) but I'm wondering if anyone knows how to make a multi-gendered or multi-skinned race. For example: An alien that comes in 4 colours that you pick the same way you choose between male and female humans.

Does anyone know how I'd achieve this?
Whale Cancer
Posts: 272
Joined: Fri Sep 21, 2012 3:28 pm

Re: Multi-skinned races help?

Postby Whale Cancer » Fri Oct 05, 2012 7:42 am

99% sure that it is a no.

I read that the alien races do have genders, but they don't actually do anything. I thought that maybe the gender names (i.e. female, in this case, as male is the default) are hard-coded in the way the word 'pirate' is in some sprites. But looking at the sprites now, the female sprites aren't even listed as being humans. They are 'female_player_*'. I don't think we will see moddable races anytime soon. I also now believe the assertion that the alien races have genders is false.

Also, it should be noted that you can't even make a race that defaults back to human powers. If you make a new race and try to add it via an event or a ship blueprint, it places a human and not your new races (the game has several default values like this to prevent crashes). If we could make dummy human races, we could at least change the descriptive text for NPCs (and use them as req values) and the like. We can't do that.
Contribute to help save the Whales from their various diseases! *DELAYED* Should release the skeleton with the main quests attached by the end of the week (By NOV 9)! *DELAYED* Don't listen to my dates! Things always seem to come up!
swixel
Posts: 80
Joined: Mon Sep 17, 2012 6:08 am

Re: Multi-skinned races help?

Postby swixel » Fri Oct 05, 2012 10:35 am

aczom wrote:As far as I know nobody has cracked the races yet


Yeah, actually, I've had it for a week. There are a lot of references not used I've just char arrayed out in the memory, so here's a VTable for you. Notably I'm using 'int' here because this *should* align with gcc and msvc compiler sizes (no crashes on my hooks).

Code: Select all

class CrewMember
{
public:
// Vtable at 0

   // ------------------------------- Begin Virtual Table
   /*  0 */ virtual ~CrewMember() = 0;
   /*  1 */ virtual int IsCrew();
   /*  2 */ virtual int Jump();
   /*  3 */ virtual long double PositionShift();
   /*  4 */ virtual int InsideRoom(int idRoom);
   /*  5 */ virtual int GetIntruder();
   /*  6 */ virtual int ExactTarget();
   /*  7 */ virtual void OnLoop(float);
   /*  8 */ virtual void OnRender(__int128, int);
   /*  9 */ virtual int OutOfGame();
   /* 10 */ virtual void SetOutOfGame();
   /* 11 */ virtual int Functional();
   /* 12 */ virtual int CountForVictory();
   /* 13 */ virtual int GetControllable();
   /* 14 */ virtual int ReadyToFight();
   /* 15 */ virtual int CanFight(); //int
   /* 16 */ virtual int CanRepair(); //int
   /* 17 */ virtual int CanSabotage(); //int
   /* 18 */ virtual int CanMan(); //int
   /* 19 */ virtual int CanTeleport();  //int
   /* 20 */ virtual int CanHeal(); //int
   /* 21 */ virtual int CanSuffocate(); //int
   /* 22 */ virtual int CanBurn();
   /* 23 */ virtual int GetMaxHealth();
   /* 24 */ virtual int IsDead();
   /* 25 */ virtual int PermanentDeath();
   /* 26 */ virtual int ShipDamage(float);
   /* 27 */ virtual int FireFightingSoundEffect();
   /* 28 */ virtual int RepairingSoundEffect();
   /* 29 */ virtual int ProvidesVision();
   /* 30 */ virtual long double GetMoveSpeedMultipler();
   /* 31 */ virtual void ActivatePower();
   /* 32 */ virtual long double GetDamageMultiplier();
   /* 33 */ virtual int ProvidesPower();
   /* 34 */ virtual void* GetSpecies(void *species);
   /* 35 */ virtual long double GetFireRepairMultiplier();
   /* 36 */ virtual int IsTelepathic();
   /* 37 */ virtual signed int64_t GetPowerCooldown();
   /* 38 */ virtual int PowerReady();
   /* 39 */ virtual void ActivatePower();
   /* 40 */ virtual int HasSpecialPower();
   /* 41 */ virtual void ResetPower();
   /* 42 */ virtual long double GetSuffocationModifier();
   /* 43 */ virtual int ValidTarget(int);
   /* 44 */ virtual int MultiShots();
   /* 45 */ virtual bool Damage(float);
   /* 46 */ virtual int64_t GetPosition(); // return Point::Point(X,Y) instance
   /* 47 */ virtual int IsDrone();
   /* 48 */ virtual int CanStim();
   /* 49 */ virtual int GetPriority();
   // --------------------------------- End Virtual Table

// Begin non-virtuals (you don't need to worry about this)
public:
   CrewMember(std::string, std::string, int, bool, CrewAnimation *);
};


aczom wrote:so making a new one gives them the default 'human' powers (IE nothing)


Hardcoded in C++, hence the vtable ... XML does nothing due to the defaulting behaviour (as Whale Cancer said).

aczom wrote: but I'm wondering if anyone knows how to make a multi-gendered or multi-skinned race. For example: An alien that comes in 4 colours that you pick the same way you choose between male and female humans.

Does anyone know how I'd achieve this?


From what I've seen, that's even further afield than just CrewMember stuff.
User avatar
Kieve
Posts: 952
Joined: Tue Sep 18, 2012 2:21 pm

Re: Multi-skinned races help?

Postby Kieve » Fri Oct 05, 2012 2:01 pm

Swixel, I think when he said "cracked this yet," he meant from a practical modding standpoint. It's great that you've managed to untangle the game's digital entrails, but without some kind of "script extender" or injector process we can distribute cross-platform (and yes, I've read about the issues with the Steam copy being a tangled DRM-riddled knot of snakes), it's not very useful to the average modder.

I could be mistaken of course. :?
Attackid
Posts: 13
Joined: Mon Oct 01, 2012 11:27 am

Re: Multi-skinned races help?

Postby Attackid » Fri Oct 05, 2012 2:12 pm

sorry to burst your bubble Whale Cancer but its very possible, changing races is not hard, you can even check my ghost mod if you don't believe me, also changing image files can be done (dev_res\img\people)
User avatar
Kieve
Posts: 952
Joined: Tue Sep 18, 2012 2:21 pm

Re: Multi-skinned races help?

Postby Kieve » Fri Oct 05, 2012 2:37 pm

Attackid wrote:sorry to burst your bubble Whale Cancer but its very possible, changing races is not hard, you can even check my ghost mod if you don't believe me, also changing image files can be done (dev_res\img\people)


:lol: Sorry to burst yours, but they were already in the game. Props for digging them out though.
And yes, we know that swapping out the animation sheets for existing races is more or less the same as repainting a ship. "New" race content is still locked down, unless as above we get some kind of injector, or more likely, FTL:Overdrive becomes playable.
Whale Cancer
Posts: 272
Joined: Fri Sep 21, 2012 3:28 pm

Re: Multi-skinned races help?

Postby Whale Cancer » Fri Oct 05, 2012 6:37 pm

Attackid wrote:sorry to burst your bubble Whale Cancer but its very possible, changing races is not hard, you can even check my ghost mod if you don't believe me, also changing image files can be done (dev_res\img\people)


Changing image files replaces existent sprites. That is not what OP is asking.

Ghosts were already in the game (and were commented on, and enabled by someone, last week).
Contribute to help save the Whales from their various diseases! *DELAYED* Should release the skeleton with the main quests attached by the end of the week (By NOV 9)! *DELAYED* Don't listen to my dates! Things always seem to come up!
swixel
Posts: 80
Joined: Mon Sep 17, 2012 6:08 am

Re: Multi-skinned races help?

Postby swixel » Fri Oct 05, 2012 8:18 pm

Kieve wrote:[...] but without some kind of "script extender" or injector process we can distribute cross-platform[...]


Aside from Steam ... I'm not presently having an issue. But I'm yet to test it on the ancient Mac here.
Icehawk78
Posts: 230
Joined: Tue Sep 18, 2012 4:55 pm

Re: Multi-skinned races help?

Postby Icehawk78 » Fri Oct 05, 2012 8:24 pm

swixel wrote:
Kieve wrote:[...] but without some kind of "script extender" or injector process we can distribute cross-platform[...]


Aside from Steam ... I'm not presently having an issue. But I'm yet to test it on the ancient Mac here.

Does your method work on Linux?
swixel
Posts: 80
Joined: Mon Sep 17, 2012 6:08 am

Re: Multi-skinned races help?

Postby swixel » Fri Oct 05, 2012 8:29 pm

Icehawk78 wrote:Does your method work on Linux?


I'm trampolining using LD_PRELOAD ... it's not perfect, but it appears to work.