1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. Photobucket has changed its policy concerning hotlinking images and now requires an account with a $399.00 annual fee to allow hotlink. More information is available at: this link.
    Dismiss Notice
  3. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  4. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  5. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  6. Dismiss Notice
  7. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

Merging BTS Modcomps

Discussion in 'Civ4 - Final Frontier Plus' started by TC01, Oct 6, 2010.

  1. PsiCorps

    PsiCorps FF: Babylon 5 mod team

    Joined:
    Dec 30, 2007
    Messages:
    1,415
    Location:
    Britain
    I'd be content to leave out gaining XP for destroying trade routes/jump Gates/lanes. Within the B5 universe destroying Jump Gates/Lanes wasn't the most sensible thing to do and trade routes aren't really physical things in space unless you count merchant ships as what the trade route represents. However, for destroying improvements/units or reducing the defences of planets I'd be happy for the fighters/bombers to gain XP.
     
  2. PsiCorps

    PsiCorps FF: Babylon 5 mod team

    Joined:
    Dec 30, 2007
    Messages:
    1,415
    Location:
    Britain
    Super Forts

    I've been looking over this ModComp I think that it is, essentially, the same as we have already with the Starbases. Is there anything in this ModComp that could be ported over to FFP?
     
  3. kiwitt

    kiwitt Road to War Modder

    Joined:
    Jan 11, 2006
    Messages:
    5,519
    Location:
    Auckland, NZ (GMT+12)
    mechaerik's War Prizes would be good.
    NOTE: A version for BUG 4.4 is here

    Allowing you to capture spaceships after a successful combat. I may consider adding the code in myself, and if I do I'll post an example of the modified code.
     
  4. PsiCorps

    PsiCorps FF: Babylon 5 mod team

    Joined:
    Dec 30, 2007
    Messages:
    1,415
    Location:
    Britain
    Now that would be a very interesting addition to FFP.
     
  5. kiwitt

    kiwitt Road to War Modder

    Joined:
    Jan 11, 2006
    Messages:
    5,519
    Location:
    Auckland, NZ (GMT+12)
    It should not be too hard. I added it in my mod as well.
     
  6. kiwitt

    kiwitt Road to War Modder

    Joined:
    Jan 11, 2006
    Messages:
    5,519
    Location:
    Auckland, NZ (GMT+12)
    I used version for BUG 4.4 is here.

    The modified code is as follows;
    Spoiler :
    Code:
    ##Basic War Prizes 1.1 by modifiedA4
    ##Basic War Prizes 1.11 by KiwiTT for Final Frontier Plus 1.8
    
    from CvPythonExtensions import *
    import CvUtil
    import PyHelpers
    import CvAdvisorUtils
    import CvTechChooser
    import BugCore
    import BugUtil
    import CvEventInterface
    
    gc = CyGlobalContext()
    localText = CyTranslator()
    PyPlayer = PyHelpers.PyPlayer
    PyInfo = PyHelpers.PyInfo
    PyCity = PyHelpers.PyCity
    PyGame = PyHelpers.PyGame
    
    class BasicWarPrizesEvent:
    
    	def __init__(self, eventMgr):
    		self.eventMgr = eventMgr
            	eventMgr.addEventHandler("combatResult", self.onCombatResult)
    			
    
    	def onCombatResult(self, argsList):
    		'Combat Result'
    		pWinner,pLoser = argsList
    		playerX = PyPlayer(pWinner.getOwner())
    		unitX = PyInfo.UnitInfo(pWinner.getUnitType())
    		playerY = PyPlayer(pLoser.getOwner())
    		unitY = PyInfo.UnitInfo(pLoser.getUnitType())
    		iBBonus=25 # 25% chance of capture
    ## mechaerik/modifieda4/KiwiTT War Prize ModComp START##
    		pPlayer = gc.getPlayer(pWinner.getOwner())
    		pPlayerLoser = gc.getPlayer(pLoser.getOwner())		
    		if (unitX.getUnitCombatType() == gc.getInfoTypeForString("UNITCOMBAT_CAPITAL_SHIP")) or (unitX.getUnitCombatType() == gc.getInfoTypeForString("UNITCOMBAT_STARBASE")):
    			if (unitY.getUnitCombatType() == gc.getInfoTypeForString("UNITCOMBAT_LIGHT_SHIP")):
    				if not (unitX.getUnitClassType() == gc.getInfoTypeForString("UNITCLASS_SCOUT_I") or unitX.getUnitClassType() == gc.getInfoTypeForString("UNITCLASS_SCOUT_II") or unitX.getUnitClassType() == gc.getInfoTypeForString("UNITCLASS_SCOUT_III")):
    					if not (unitY.getUnitClassType() == gc.getInfoTypeForString("UNITCLASS_SCOUT_I") or unitY.getUnitClassType() == gc.getInfoTypeForString("UNITCLASS_SCOUT_II") or unitY.getUnitClassType() == gc.getInfoTypeForString("UNITCLASS_SCOUT_III")):
    						if playerX.isBarbarian():
    							iBBonus=10 # barbarian bonus 10%
    						if CyGame().getSorenRandNum(100, "modifieda4") <= iBBonus:
    							iUnit = pLoser.getUnitType()
    							newUnit = pPlayer.initUnit(pLoser.getUnitType(), pWinner.getX(), pWinner.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.NO_DIRECTION)
    							newUnit.finishMoves()
    							newUnit.setDamage(90, pWinner.getOwner())
    							if (pPlayer.isHuman()):
    								CyInterface().addMessage(pWinner.getOwner(),false,20,CyTranslator().getText("TXT_KEY_MISC_WARPRIZES_SUCCESS",(pLoser.getName(),)),'',0,'Art/Interface/Buttons/General/warning_popup.dds',ColorTypes(gc.getInfoTypeForString("COLOR_BLUE")), pWinner.getX(), pWinner.getY(), True,True)
    							elif (pPlayerLoser.isHuman()):
    								CyInterface().addMessage(pLoser.getOwner(),false,20,CyTranslator().getText("TXT_KEY_MISC_WARPRIZES_FAILURE",(pLoser.getName(),)),'',0,'Art/Interface/Buttons/General/warning_popup.dds',ColorTypes(gc.getInfoTypeForString("COLOR_RED")), pLoser.getX(), pLoser.getY(), True,True)  
    		## War Prize Modcomp END##
    Essentially I modified the code so that only Starbases and Capital Ships can capture Light Ships, implying that the larger ships have tractor beams. 25% for players and 10% for pirates, plus the captured unit only has 10% strength left.

    POST number 3,000 !!!!
     
  7. God-Emperor

    God-Emperor Chieftain

    Joined:
    Jul 18, 2009
    Messages:
    3,551
    Location:
    Texas
    I have considered adding ship capture on some victories. Currently you do capture a sensor station (and construction ships, and colony ships are captured as construction ships) if you attack it (although the Pirates don't, same as barbarians and workers/settlers in BtS since it uses the same XML tag in the unit info) - I think it has been that way since TC01 first added them.

    The problem is that this can result in a somewhat overwhelming buildup. If I attack you and win more often that I lose (or just get lucky with the capture randomness) I just get stronger and stronger compared to you, reducing your chances of resisting even more than usual. Not only do I get your star system, I get some of your ships too.

    In the regular version of this modcomp it is only valid for a subset of units, the naval units. The types of units affected are somewhat restricted in the things they can do. None of them can directly capture, or defend, a city. Controlling the oceans is very valuable on some maps but it does not generally lead directly to a military victory. The units you capture in FFP would, however, be directly usable to attack or defend star systems just like any other unit.

    So I'm not sure if this is a good idea. Maybe if the odds are very low (5% or less), making it more of an occasional surprise bonus than something you can count on happening on a regular basis. I'd also be tempted to allow the Pirates to use it, perhaps at about half the chance. If adding it at all.

    Another possibility: a game option you can use to activate it.

    As for the Super Forts, I don't think there is anything in there for us.
     
  8. kiwitt

    kiwitt Road to War Modder

    Joined:
    Jan 11, 2006
    Messages:
    5,519
    Location:
    Auckland, NZ (GMT+12)
    OK. I have modified the code above so that you have a 25% chance to capture a light ship if you win the combat with your capital ship or starbase. The pirates have a 10% chance.

    Also changed the damage to 90 hitpoints. This means you will have to heal the unit before it is effective.

    I will now play test and see how this goes.
     
  9. PsiCorps

    PsiCorps FF: Babylon 5 mod team

    Joined:
    Dec 30, 2007
    Messages:
    1,415
    Location:
    Britain
    That would be what I would aim for, capturing ships was not something commonly done in Babylon 5. However, capturing a Starbase was something that was attempted on at least two instances on the TV show. So I would raise the chance for the capturing of a Starbase to maybe 15 or 20% but keep the chances for capturing ships down at around 5%, 2 % for pirates/barbs.
     
  10. kiwitt

    kiwitt Road to War Modder

    Joined:
    Jan 11, 2006
    Messages:
    5,519
    Location:
    Auckland, NZ (GMT+12)
    For me Starbases are less likely to be captured as I consider them like in Star Wars and Star Trek (e.g. Deep Space 9).

    However, feel free to modify the variables as you see fit, in the code. I am currently playtesting; Capture 25% (Barbarians 10%), Damage 90 hit points.

    I also think limiting it to Capital Ships and Starbases should limit the impact on the overall game as well.
     
  11. PsiCorps

    PsiCorps FF: Babylon 5 mod team

    Joined:
    Dec 30, 2007
    Messages:
    1,415
    Location:
    Britain
    Hi all, I've come across another ModComp that may be very useful

    Diplomats

    Change the diplomat artwork to be a small diplomatic vessel that does all of the same things and you're golden.
     
  12. PsiCorps

    PsiCorps FF: Babylon 5 mod team

    Joined:
    Dec 30, 2007
    Messages:
    1,415
    Location:
    Britain
    Hi guys, any idea when an updated version of FF+ will be released?
     

Share This Page