1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Robots, everyone wants them

Discussion in 'Civ4 Fallout: Tame The Waste (FTTW)' started by clanky4, Aug 27, 2015.

  1. clanky4

    clanky4 Emperor

    Joined:
    Jul 11, 2012
    Messages:
    1,261
    Location:
    USA
    Should they be captureable? Obviously some robots simply couldn't be. Eyebots got a self destruct and Securitrons are remotely fried if they take too much damage. But other robots could potentially be captured and repaired.

    Obviously most would get trashed in combat but say if a unit had a certain promotion: say robotics expert. They could have a small chance, maybe 10%, to capture any robots they defeat in combat.

    I'm not saying we need to do this right now I just wanted to put the idea out there, and probably already have, just so we can implement it someday.
     
  2. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,708
    Location:
    UK
    In my random ideas thread I talked about this idea at one point, let me see if I can find it...

    Captured Robots:
    Gain a Broken Robot on Robot defeat
    Can be upgraded/repaired in towns.
    Requires 'Repair Shop'
    No bonus prereqs to repair.
    Slightly weaker than a brand new robot.

    I don't know if I elaborated on it further someplace else...

    Anyway your idea would be similar to the slavery system that we have now (except that has a max number of slave slots on a unit rather than a percentage chance.)

    We could perhaps use that, but it would require some recoding that I am not capable of to make it a seperate thing.

    Alternatively we could make robots a different kind of slave, so would just fill up slots in a slaver unit, and then this can be converted to a SPECIALIST_SLAVE_ROBOT, I am not sure if this part of the slavery component creates an entirely different kind of unit, or just a different kind of specialist, (Originally it was designed to make 'Slave great people' if you captured a great person with a slaver unit.), so this part might be too limited (We would need to go back and look at archid's slavery modcomp in detail again to be sure).

    Alternately we can (I think) do my version of the idea fairly easily, which is to use the existing mechanic that lets you capture workers, we can just define robots to be captured as robots.

    It could then be that you just capture the type of robot and reuse it straight away, or you capture a 'broken' version of the robot that needs to be fixed (upgraded) in town, or you capture a robot that is like a great persn that can then be settled in town as a robot great person.

    Or some kind of version/variant of all of the above.

    I am certain that all of those options can be done purely with XML changes, rather than needing to code any new kind of mechanic.
     
  3. clanky4

    clanky4 Emperor

    Joined:
    Jul 11, 2012
    Messages:
    1,261
    Location:
    USA
    I've literally never used the slavers in this mod. Mainly because against my fundamental morals of: "Build robots as soon as possible" Don't they just capture workers from all units, ala RFC's aztec unique ability?
     
  4. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,708
    Location:
    UK
    No.

    The way it works is if you have a slaver(Unit or promo) in an attacking stack and you kill something and the slaver collects a slave token and depending on the slaver there is a max number of tokens it can carry.

    Then the slaver brings back the tokens to anywhere with a slave market, and it can sell the slave for profit. You then get a slave unit which can be used like a superfast worker who dies after the improvement is finished.

    (This is not that helpful at the minute as I need to increase the time it takes for improvements to be made to make this worth while I think. Eventually I want to change the code (if anyone comes around to help) so that I can also decrease the gold cost of improvements with worker promos, then the slave can also massively reduce the cost of it's improvement as well, this would then make the whole thing more valuable.)

    The slave can also join the city as a slave specialist, who can die from over work (again I need to see about balancing the time out a bit.)
    I also added that for super mutants the slave can be upgraded to an unarmed super mutant (I think this is still active) although I don't think the AI is making decent use of slavers, it is supposed to use them but I have never actually seen it do it.. even when I manufactured a perfect scenario for it, so not sure what is happening there.
    (The AI did get an upgrade, but I don't think I have tested it again to see if it is better at using them)

    I also want to add in some mor stuff for slaves to try and make them a bit more important/useful. Stuff like unique improvements that only they can build, like slave pens which spawn slaves (unfortunately the spawn code is a bit broken at the minute so can't..)

    I think I can partly fix the issue, but I need to get my computer set back up to compile the dll and I just have not had the energy to do it..

    Anyway, out of those xml options for robots, what do you prefer?
     
  5. clanky4

    clanky4 Emperor

    Joined:
    Jul 11, 2012
    Messages:
    1,261
    Location:
    USA
    You could just have the slaves use a separate build from the ordinary worker. Having it yield the same improvement but then being able to change how long it takes to build and how much it costs. The only issue with this is if you have too many that an ordinary worker does not have than the pedia will get clogged with "can build farm, can build mine, can build other stuff" rather than the simple can build improvements.

    The AI won't use slavers or the AI won't build slavers? In general the AI won't build a certain type of unit if they can build another that has higher strength. Unless you know its siege vs. footmen vs. scouts vs. cavalry.

    You can use python for spawning stuff. Of course it'll cause problems pretty fast if your using it several times a turn for multiple things.

    If a % chance could be added to a slaver like unit, or just a promotion you could tack onto any human unit really, that would be ideal. Because unlike humans a robot is not going to surrender. The vast majority of the robots AI in fallout is primitive they have very little inclination towards self preservation and will fight you till the death. It takes a special touch to bring one down without blowing the dang thing up.
     
  6. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,708
    Location:
    UK
    At the moment I am not sure where the AI falls down in using slaver units, or if they now use them since the AI upgrade to the slaver modcomp.

    Without archid around I can't find the answer all that easy.

    I originally had the spawning code in python and it worked, archid remade it and moved it to the .dll to improve performance, unfortunately what I hoped wouldn't happen happened, which is the code doesn't work right and I cannot fix it and archid is not around... So I am stuck!

    So your answer to which of my doable xml ideas you prefer is to restate your original suggestion that I said I was unable to do....[pissed] good answer! :lol:
     
  7. clanky4

    clanky4 Emperor

    Joined:
    Jul 11, 2012
    Messages:
    1,261
    Location:
    USA
    Tried editing one line of python game exploded. All I was asking it to do was check who lost after combat :lol:
     
  8. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,708
    Location:
    UK
    Yeah I only ever mess around with python that I know already works!

    Then at least if I break it I can just put it back to where I had it.

    I meant to say I had thought the same with the slaves having a unique set of improvements.

    I am not so bothered about the pedia being overloaded with information.

    I had been considering having three kinds of improvement for a while.

    Slave/Standard/Robotic

    With slave being cheaper but less productive and robot being more expensive but more productive. As well as being only buildable by their kind of worker, slave/worker/robot.

    Alternatively it could be a bit more layered than that, so for example:

    the slave versions could be more productive than the basic worker version, but the worker version upgrades beyond the capabilities of the slave version. The opposite could be true of the robot one, it starts less productive, but grows to be more productive.

    We can even have it that civics change the happy/unhappiness of improvements, as well as how productive they are. So slave camps remain if you change from slavery, but they also become unpopular.
     
  9. clanky4

    clanky4 Emperor

    Joined:
    Jul 11, 2012
    Messages:
    1,261
    Location:
    USA
    It had one too many bracket, so finicky. Anyway this snippet of python code will allow a unit which a certain promotion, in this case Toughness1, who beats a unitcombat_robot to spawn a robot of the type it just beat on the plot it is standing on.

    Its the same code I used for that Villagers mode way back when. I used it for zombies though.

    Code:
    	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())
    ## Villagers Frekk Slaver! ##		
    		pPlayer = gc.getPlayer(pWinner.getOwner())
    		pPlayerloser = gc.getPlayer(pLoser.getOwner())		
    		if pWinner.isHasPromotion(gc.getInfoTypeForString('PROMOTION_TOUGHNESS1')):
    			if (unitY.getUnitCombatType() == gc.getInfoTypeForString("UNITCOMBAT_ROBOT")):
    				iSlavechance = 25 # 25% base chance
    				if CyGame().getSorenRandNum(100, "mrhouse") <= iSlavechance:		
    					iUnit = pLoser.getUnitType()
    					newUnit = pPlayer.initUnit(iUnit, pWinner.getX(), pWinner.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.NO_DIRECTION)
    					newUnit.finishMoves()	
    
    ## Villagers Frekk Slaver! ##
    		if (not self.__LOG_COMBAT):
    			return
    		if playerX and playerX and unitX and playerY:
    			CvUtil.pyPrint('Player %d Civilization %s Unit %s has defeated Player %d Civilization %s Unit %s' 
    				%(playerX.getID(), playerX.getCivilizationName(), unitX.getDescription(), 
    				playerY.getID(), playerY.getCivilizationName(), unitY.getDescription()))
    
     
  10. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,708
    Location:
    UK
    ok, so how do you suggest we use this then, at what point do we introduce this promotion?

    Is it available from the start?
    Are we going to introduce multiple levels to upgrade to?
     
  11. clanky4

    clanky4 Emperor

    Joined:
    Jul 11, 2012
    Messages:
    1,261
    Location:
    USA
    A potential promotion that it could use would be something that requires like a salvaging-type technology. I'd prefer to have it simply be a be all end all for what it is. One could choose to take it or not. Probably attach a slight buff against robot type units so the AI could potentially have a use for it.
     

Share This Page