Jump to content


Photo

Advanced/Intermediate theory for expansion of gameplay for FOC


12 replies to this topic

#1 halmal242

halmal242
  • Members
  • 16 posts

Posted 29 January 2013 - 07:17 PM

Ok, as you guys know I have been attempting to work on a port of the galactic story for the original campaigns using and still allow PR to play with that.  I have figured out how to do it but I am still plugging away at school so I dropped the project for a while but still tinkered with it now and again.  I have a few other pans in the fire so its not a primary concern but still plugging away at it now and then.  With that out of the way I wanted to ask about something that I think is possible within the scope of the game through scripting but not sure of its effect.

 

I had asked previously in the food/population thread about adding a new resource to the game and you said it was possible but potentially could hurt performance.  So I was thinking about this and looking through how units transfer from one unit to another within the upgrade schema you guys use and I had an idea.  Is it possible to add a value to a unit "experience" such that when a "hero" kills it that unit gains the experience such that once they have enough hat unit is replaced by its upgraded unit.  Then have the transport unit be upgraded through tech upgrades.  This would effectively decouple character growth from what equipment/craft the unit wields.  Obviously this could get really complicated so I was also considering a hero tier to go with this.  Something along the lines of Minor heroes which can only level a few levels (3), Lesser Heroes which can be killed but can level higher (~5), and then Major hero's not kill-able and can level much higher(10).  

 

So something like this.

 

Major Heroes;

 

Luke, Leia, Han/Chewie, Mon Mothma, Emperor, Vader

 

Lesser Heroes;

 

Wedge, Thrawn, Ackbar, Tarkin

 

Minor;

 

Most everyone else.

 

This may or may not even be possible but would bring a great amount of depth to the game about wanting to protect your hero units a little more besides the obvious financial and time lost by having to recruit and upgrade them.  This wold make it that you would want to protect them even better and grow them throughout the game.  Maybe just a pipe dream but there it is.



#2 Phoenix Rising

Phoenix Rising

    Beyond the Impossible

  • Petrolution Staff
  • 6,509 posts
  • Projects:Phoenix Rising
  •  Mod Leader
  • Division:Petrolution
  • Job:Mod Specialist

Posted 30 January 2013 - 02:40 AM

Experience is basically another resource, except it's saved on the unit rather than pooled galactically.  You wouldn't be able to set experience values like you would for a natural property, so that would have to be done with a huge if-else statement every time a unit is killed.  Given the number of units we have, this would probably create a significant performance hit, although you might be able to optimize it by setting experience by class, assuming you'd be willing to make that compromise.  At least the part about creating a new variable for every hero shouldn't hurt anything.



#3 halmal242

halmal242
  • Members
  • 16 posts

Posted 30 January 2013 - 05:06 AM

My thought was having multiple resource pools such that one script would run to keep tabs on all the different pools.  I like the idea of experience by class as opposed to individual values.  If you limit the if-else to only when a hero kills something it may be more possible without a huge performance hit if the script is kept simple.  Maybe a tactical script and a strategic script to keep the processes separate.  The strategic script would run only while in combat and at end of combat would then update the strategic script at end, when reentering the strategic screen a simple check to determine if a threshold is met then either level or not.

 

Keep in mind this is just theory for now.  I have extremely limited scripting experience but I am learning more each day.



#4 Phoenix Rising

Phoenix Rising

    Beyond the Impossible

  • Petrolution Staff
  • 6,509 posts
  • Projects:Phoenix Rising
  •  Mod Leader
  • Division:Petrolution
  • Job:Mod Specialist

Posted 30 January 2013 - 07:13 PM

It would help; the problem is, the built-in function for identifying a hero only works on named hero types - the ones that respawn.  Since we don't use those, it always returns false.  Still trying to find an alternative (it affects the hero free store)...



#5 halmal242

halmal242
  • Members
  • 16 posts

Posted 30 January 2013 - 09:08 PM

I was pondering this and there might be a way to overcome this.  You guys created new categories for different tiers of units, cruisers, battlecruisers and such.  Would this be a way to create a unique category for each hero.  So for Luke he would be the < Category_Mask>Luke</Category_Mask>  Then you could just build that as its identifier.  Then for the transport unit it would have multiple categories like it always has.



#6 Phoenix Rising

Phoenix Rising

    Beyond the Impossible

  • Petrolution Staff
  • 6,509 posts
  • Projects:Phoenix Rising
  •  Mod Leader
  • Division:Petrolution
  • Job:Mod Specialist

Posted 31 January 2013 - 08:03 PM

The category mask is a size 32 bit field, which means the engine is limited to 32 unique categories.  I cut some and added others, but the bottom line is we've nearly used all the available bits.



#7 halmal242

halmal242
  • Members
  • 16 posts

Posted 31 January 2013 - 09:12 PM

Nuts, then there is no way without reimplementing the IsHero tag that has been disabled for PR.  At least as far I can tell since there is no other identifying tag that I can think.  For a feature which would be cool but is not feasible until the source code could be accessed the idea is shelved for now unless someone comes up with a more creative plan.


Edited by halmal242, 31 January 2013 - 09:13 PM.


#8 Phoenix Rising

Phoenix Rising

    Beyond the Impossible

  • Petrolution Staff
  • 6,509 posts
  • Projects:Phoenix Rising
  •  Mod Leader
  • Division:Petrolution
  • Job:Mod Specialist

Posted 01 February 2013 - 05:23 AM

Right.  Just to be clear, IsHero() is still implemented and does what it was designed to do; it just no longer makes logical sense for our heroes.  IsNamedHero() would've been a better name.  From what I've seen, generic heroes feel like a late addition.  PG often referred to them by their literal team name rather than through a function - so much even that deleting the generic officer names from the code breaks the game.  That kind of sloppy coding, along with the related XML comments (they certainly came after named), hints at crunch time, so I doubt a IsGenericHero()-equivalent function exists.



#9 halmal242

halmal242
  • Members
  • 16 posts

Posted 01 February 2013 - 04:18 PM

Sorry that was what I was referring to.  I really hope they allow modding of the source code as some of these issues could be corrected much more easily.



#10 johnchm.10

johnchm.10

    ALL HUMANS ARE VERMIN IN THE EYES OF MORBO!

  • Members
  • 738 posts
  • Location:OMICRON PERSEI 8!

Posted 01 February 2013 - 06:24 PM

here's what baffles me about ALAMO. it appears that it hasn't been used by PG for several years, not since Universe At War, to be a bit more precise. its not like Unreal Engine, which pretty much has been in use for the last decade or so (from UE1-to-4). and its not like there aren't any other RTS engines out there. hell, if Refractor allows you to use aircraft, tanks, boats, and be a soldier in Battlefield 1942 and BF2, then its not like other engines can't do what Alamo does



#11 Phoenix Rising

Phoenix Rising

    Beyond the Impossible

  • Petrolution Staff
  • 6,509 posts
  • Projects:Phoenix Rising
  •  Mod Leader
  • Division:Petrolution
  • Job:Mod Specialist

Posted 01 February 2013 - 06:36 PM

Besides the fact that distributing a new executable would be against the stated modding terms and conditions, I'd wager that LucasArts/Disney has most of the say in whether the source code is released.  There's just no profit in it.



#12 a.fake.name

a.fake.name

    title available

  • Members
  • 539 posts

Posted 29 March 2013 - 08:23 AM

Halmal, why not just have experince as be a normal resoruce, have heroes set so their presence unlocks the upgrade (like the Ark Hammer does for darktroopers), and then just spend the experiece resource on the upgrades.


Playing PR when stoned is awesome

 


#13 halmal242

halmal242
  • Members
  • 16 posts

Posted 29 March 2013 - 10:41 PM

The idea is to have individual experience tables for each hero.  By having a general experience pool then you could have a high level character "power" level a low level character by going in and gaining a bunch of exp and then having it spent by a different character.





Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users