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

Reply
 
Thread Tools Display Modes
  #1  
Old 08-03-2010, 11:35 AM
Aleksandar Aleksandar is offline
Registered Member
 
Join Date: Aug 2010
Posts: 10
Default ATTN: Nanaki and Goblin Wizard

Hey guys.

Read thru the two modding threads and figured you two for the biggest contributors. So you're the guys that I wanna talk to.

Basically, what I want done - and i'm ready to put some work in it - is a Specialization Mod.

The four specializations the game gives you at the start are a joke. So, here's my first barrage of questions:

1. Can new specializations be put in the game?

I know we can't add brand new special abilities (go figure) and that we can just build on top of the regular legos we have (current abilities), which leads to my next question -

2. Where do I mix and match skill-trees in order to make new ones?

Gremlin Wizard brought back KT from SW2, and he mentioned tweaking their skills so i figure this one is perfectly plausible.

3. Where are the starting specializations defined?

I know there's more than four, I've messed around with SW2 as well. I want more options than simply "gunner/missile/system/piloting".

Also, keep up the good work adding new ships guys. I just stick to coding/scripting. :thumbs:

Last edited by Aleksandar; 08-03-2010 at 02:11 PM.
Reply With Quote
  #2  
Old 08-03-2010, 01:18 PM
Goblin Wizard Goblin Wizard is offline
Approved Member
 
Join Date: Oct 2008
Posts: 508
Default

Quote:
Originally Posted by Aleksandar View Post
1. Can new specializations be put in the game?
I didn't try so I don't know. You can change existing ones without problems. Choosing specialization works like choosing between 4 different pilots with the same face pic.

Quote:
Originally Posted by Aleksandar View Post
2. Where do I mix and match skill-trees in order to make new ones?
..\Data\Scripts\include\PilotProperties.script
all needed graphic tweaks go here:
..\Data\TEXTURE\Interface\Pilot\PerkTree

Quote:
Originally Posted by Aleksandar View Post
3. Where are the starting specializations defined?
The same place as other pilots:
..\Data\Scripts\include\PilotProperties.script
Look for "properties_Hero_gun", ..Hero_pil, etc.


It's not totally true that you can't add new perks. It's just very limited. Check here:
..\Data\Scripts\AI\perkDispatcher.script
It's a list of functions connected with certain perks. Inside these functions you can add your ifs involve any perk. For example - some time ago I've created Master Mind perk and added it to the ModifyGainedExperience function:
Code:
if pilot:HavePerk("Master_Mind")
  then
    amplifier = amplifier + 1
end;
This perk simply doubles experience a pilot gains. This way you can add unlimited number of perks.
So.. you are limited to the existing, hardcoded abilities but you can mix them in your own perks.
Reply With Quote
  #3  
Old 08-03-2010, 01:31 PM
Trucidation
Guest
 
Posts: n/a
Default

Rearranging skills into all-new trees should be as easy (?) as editing PilotProperties.script, and if you refer to the pilot interface folders for tips you'll see code defining their trees as well as the graphics for them. They aren't in nice complete images, every single skill has a bunch of what appears to be coordinate definitions inside an .ini file, among other things.

The specializations themselves aren't really mentioned as such in the scripts; they appear to be simply a fancy way of asking the player to choose which list of skills Hero should have. I suspect you can mangle these four skill trees as much as you like short of actually altering how many of them there are. Why? Because displaying the names of the skill trees is actually hardcoded text in one of the short interface (.loc) files. E.g. for my missiles mod I wanted to display such useful stuff as how many warheads per MIRV instead of the total because a single total number doesn't tell you how many fragments you get, but there's simply no support for displaying additional variables in the interface.

The skills themselves are hardcoded to some extent as you can see in CalculatePilotSkills.script and perkDispatcher.script (as seen here). That's only for the passives iirc, I didn't bother looking up the actives, summons, etc since the game is being an ass at not caring about changes to the XML schema files.

Pretty sure you can toss existing skills but you'd need to grep the AI pilots script and make sure to remove/replace mention of those skills as well. Like for example if you wanted to ditch Gunnery_1 and enter a new skill called Badass_1. You'd need to edit out any mention of Gunnery_1 in the scripts and enter code to handle Badass_1. It might be more convenient to just hijack an existing passive skill - in that case you can leave the AI entries alone and just edit the code structures.

TL;DR: it should be possible to replace the specializations with completely new skill trees but you'll have to keep the same number of them (i.e. 4) -- and make sure to edit the code scripts to change the behaviour of the skills.

Edit: as usual, Goblin Wizard explains it better
Reply With Quote
  #4  
Old 08-03-2010, 01:38 PM
Aleksandar Aleksandar is offline
Registered Member
 
Join Date: Aug 2010
Posts: 10
Default

Ah, sorry for spelling your name out wrong Goblin Wizard.

Yeah, that's what I meant by mix n matching. The game is scripted in LUA (or so it seems) so I should be able to use everything the devs did.

But I guess that means new summon spells are out of the question, eh? I remember in SW2 that most summon spells shared the same assets, so you couldn't have more than one active. I'm guessing I can make additional summons, by basing it off of higher levels of current summons rather than making new summons from scratch (because I can't think of the way to tell the game to use my newSummonGroup variable)

Lame, just when I was thinking of making a Summoner character. I'll have to make due without a new summon group then.

Since you're making very decent progress with ships, I'm glad to say that I've got half of my work cut out for me. By the time I work out a few new hero classes you'll probably release an update or two.

Speaking of which, why isn't there an "unofficial" patch or expansion pack for the game available yet? Don't you think you could do more if you teamed up? I'd be eager to help out with the said part of the game which noone seems to have touched yet - character creation.

The main reason behind this is that Missiles are somewhat lame (something I plan on fixing later, possibly adding some missile-swarms/spams or reworking the missiles in general since their only use is to snipe outside of "response range" which is, imho, very lame). Gunnery is ok, as is Piloting, but Sensors are also useless due to the fact that outiside repairing and knocking off missiles (which are lame) everything else is of marginal use (for a specialization).

Thus, I have a few additional classes in mind, apart from activating some npc ones
- Summoner
- Missiler (improved)
- Gunner (default)
- Sensors (improved)
- Piloting (might improve when I see what I've got to work with)
- Dogfighter (i think this class is already in the game, favors piloting and in-fighting skills)
- Squadron Commander (a bit of summoning paired with passive/active buffs and debuffs, more of a support role really).

While the Summoner was supposed to have all four summoning spells, possible bumped onto higher levels, the Squadron Commander was supposed to call in a support group - repair, reshield and that sorta thing. If scratch new summons are impossible though.... any ideas how to piggy-back this into the game?

EDIT:
Crap, why only 4? Can I maybe do something (dialog perhaps) before the player is generated and "pick" a character generation path from there? Say, picking "Assault" dialog option would show only the "Dogfighter / gunner / pilot / missiler" classes, while "Support" would allow for summoner/squadron cmdr/sensors?

Also, I expected the XMLs to reflect the engine all the time, and vice-versa only some of the time. So I don't put my faith in XMLs too much, because I expect that to not work more often than not. "Glad" to see it works sometimes and some other times it doesn't.

Last edited by Aleksandar; 08-03-2010 at 01:45 PM.
Reply With Quote
  #5  
Old 08-03-2010, 01:52 PM
Goblin Wizard Goblin Wizard is offline
Approved Member
 
Join Date: Oct 2008
Posts: 508
Default

As you said 4 summon types are possible. Everyone with several levels. Do you really need more than 4 for each character?
But if you really need more you can use a little trick. Summon type perk can activate any part of the code, right? Why don't activate a dialog with several options? Every option summons a group of your choice or activate any other part of the code you desire. It needs some clicking but you can try.
Reply With Quote
  #6  
Old 08-03-2010, 02:07 PM
Aleksandar Aleksandar is offline
Registered Member
 
Join Date: Aug 2010
Posts: 10
Default

On a quick glance, I noticed this
Code:
function CanAddProperty(pilot, proper)

--proper = {100,{"Instructor", "Tactics"},{}}

prop_ = proper[2]; // {"Instructor, "Tactics"};
deprop_ = proper[3]; // {}
numProps = getn(proper[2]); //2
numDeProps = getn(proper[3]); //0

~for each prop in prop_
check to see if the pilot has the passed props arguments. return 1 if he does.

~for each deprop in deprop_
check to see if the pilot has the passed deprop arguments. return 0 if he does.
Long story short, the function CanAddProperty(pilot, property) has prerequisites and denials.

The first part of the code checks if you can actually get the property by checking for prereq skills. The second part of the code checks the third param (first is XP price, second is a list of all the prereqs and the third is a list of all denials) and if the pilot has that property (say, Gunnery_3) you cannot get the wanted property. This leads me to believe we can make Character Decisions so that if you get one skill, you cannot get some others.

This will work well in fleshing out the classes since I can put way more skills and interlace them in a mutually-exclusive tree, thus holding two classes in just one class. That way, I hope, I'll make some dummy "choice" perks and use them to limit the trees. So, say advancing gunnery 1 and 2 is ok, but picking Gunnery 3 forever locks you out of picking Missiles 3, which further locks you away from all the Missily goodness but opens the door to gunnery goodness perks.

This way, I believe, I can put all my 7-8 classes into four, rename them into Assault / Dogfighter / Commander / Support and have each one describe the opportunities found within. The original devs never seemed to used this, so it may not work. But it's a shot.

Last edited by Aleksandar; 08-03-2010 at 02:29 PM. Reason: code talk
Reply With Quote
  #7  
Old 08-03-2010, 03:01 PM
Trucidation
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by Aleksandar View Post
This leads me to believe we can make Character Decisions so that if you get one skill, you cannot get some others.

[...]

The original devs never seemed to used this, so it may not work. But it's a shot.
They did use it, albeit only for weapon specialization skills, and only for a single tier. See here.

Doesn't seem like there's anything there preventing you from expanding the branches further like you've planned.
Reply With Quote
  #8  
Old 08-03-2010, 03:42 PM
Aleksandar Aleksandar is offline
Registered Member
 
Join Date: Aug 2010
Posts: 10
Default

Quote:
Originally Posted by Trucidation View Post
Haha, edited while edited. Thanks, looks like I got it.

Hmm, it looks like { exp cost, { pre-req1, pre-req2, ... }, { choose one of these1, choose one of these2 }.

The third {} appears to be used only by the gun specialisations (choose HC / AC / Laser). I wonder if we can put other perks in here as well. E.g. choose between Criticals_1 or Hard_to_Kill.
Put it here for reference. Also, proposing a fix to the CanAddProperty function below
Code:
function CanAddProperty-Shark(pilot, property)

	if property == nil then
			return 0;
	else
		local nPrereqs = getn(property[2]);
		local nDenials = getn(property[3]);
		local prop_ = property[2];
		local deny_ = property[3];-
	
		local prereqsMet = FALSE;
		local deniesMet = FALSE;
		local i = 1;
	
		if(nPrereqs > 0) then
			if(pilot:HasProperty(prop_[1])) then 
				prereqsMet = TRUE;
				i = i+1;
			elseif
				return FALSE; --no prereq met
			end;

	-- Retrieved the first prereq flag. Collate with others and return

			while ((i <= nPrereqs) and (prereqsMet ~= FALSE)) do
				prereqsMet = prereqsMet and (pilot:HasProperty(prop_[i]));
			end;
		end;
	
	--Prereqs calculated, check for denies

		if(nDenials > 0) then
		--restart the counter
			i = 1;
			while ((i < nDenials) and (deniesMet ~= TRUE)) do
				deniesMet = deniesMet or (pilot:HasProperty(prop_[i]));
			end;
		end;

	--Denies calculated; return prereqsMet && !deniesMet
	
	return (prereqsMet and (not deniesMet));

	end; --property not nil
end; --eof
Feel free to correct my syntax errors, I'm still new at this language... spent about 10 mins viewing the game's scripts and I'm already making improvements... I need to get a grasp on language constructors and keywords. So far I've noticed I can do for, foreach and while - quite enough to build up anything more serious if there's a need. The lists help too, so if a need arises for a HashMap, I'll hash one out (hehe) for you.

Btw, I'm Aleksandar, a math/IT/AI graduate. Not much of a Touhou fan, but I adore bullethell shmups.

Last edited by Aleksandar; 08-03-2010 at 03:53 PM.
Reply With Quote
  #9  
Old 08-03-2010, 10:10 PM
Trucidation
Guest
 
Posts: n/a
Default

I don't know LUA so I can't comment on that (really ought to look it up but things just keep happening...) - how do you tell the game to use new functions you add? I'm guessing you just add calls from other scripts?

Not much of a technical guy, I'm just a 2-bit musician
Reply With Quote
  #10  
Old 08-03-2010, 10:48 PM
Goblin Wizard Goblin Wizard is offline
Approved Member
 
Join Date: Oct 2008
Posts: 508
Default

@Aleksandar - nice to see an educated programmer here. I like poking through the scripts but it's just a hobby.
btw if I understand correctly - your script does the same as original only in other way. AFAIK CanAddProperty function is base function called from the exe so you shouldn't change it's name.
Reply With Quote
Reply


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 12:38 AM.


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