Need advice/help for major mod project

MrGrimMrGrim Join Date: 2013-07-25 Member: 186400Members
First I have almost no experience with modding, but I am very committed to learning. (I would like to make a carrier out of game programming eventually)

the first part of the mod is about having game play water.
1. most rooms will have a water supply (pipe or waterfall) and/or drain (lava, off map, traditional drain).
2. water slows down objects (water friction).
3. water shorts out damaged buildings (armor removed) damaged buildings discharge electricity, the structure still works it just takes damage until repaired or it is destroyed.
4. lifeforms and marines can drown (this includes alien buildings)
5. there will be adaptations for each team to counter/use water to their advantage.

The math involved is easy mf=mi+min-mout.
I've already found out how to change speed through friction changes but how do you add a friction layer?
I don't have a clue on how to add a suffocation timer.

adaptations:
Aliens
Amphibious(hive): removes suffocation timer. (lifeforms and structures)
Amphibious(life-form): water speed increased. (eventually I want to have new models with fins)

Marines: Breathers: remove suffocation timer. Can be bought by individual marine at low cost or at arms lab for large(er) cost and effects all marines like armor upgrades.
Water jets: allow marines to jet forward in water.

This is just a basic idea for requirements to complete this project I have more ideas that would allow the game to be balanced with the changes. A large part of the inspiration for this is to add a layer to the game so it isn't just about rt & tech points.

Again I am very committed to having this system work if for nothing more than a learning experience. All advice is very appreciated.

Comments

  • SamusDroidSamusDroid Colorado Join Date: 2013-05-13 Member: 185219Members, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Gold, Subnautica Playtester, NS2 Community Developer, Pistachionauts
    edited July 2013
    http://steamcommunity.com/sharedfiles/filedetails/?id=113181405
    This might be of interest to you. While slightly buggy and not working, it will should how to have the "swimming" effect.
    You'll need to make a good water texture in this case, which is very difficult to do, or pray there is one in Biodome files. While there is the water from Descent water treatment tanks, it is slow moving, you can stretch it to make it move faster, but it doesn't look as good.

    For the suffocation timer you could do something like
    local kSuffocationTime = 2000 // Not sure what GetTime or equivalent would output, so assuming time is in milliseconds, so 20 seconds
    local kCanSuffocate = true //player has the no suffocation upgrade/ability 
    
    if GetHasTech("Breather") then //equivalent to whatever the function/variable that returns true when player purchases upgrade.
    kCanSuffocate = false
    end
    
    function onEnterWater() //only called once when you enter the water
    local enterTime = os.getTime() //not sure about what command to get time works in this. Only called once
    local player = Client.GetLocalPlayer()
    end
    
    function whileInWater() //continuously called while player is in the water
        local currentTime = os.GetTime() //needs to be looped to be updates while player is in the water
             if ( currentTime >= (enterTime + kSuffocationTime) then //get the time entered water and add suffocation time. Ex: if current time was equal to 1600, and entered time was 1110, compare if(1600 >= 1100 + 2000). Wait until time > 3100 or 31 seconds
                  if kCanSuffocate ~= false then //only kill if player does not have no suffocation upgrade/ability
                  player:kill() // or whatever the kill player command is, could look up kill console command for this.
                  end
             enterTime = os.getTime() //reset the entered time so it ends the loop.
             end
    end
    
  • TharosTharos Join Date: 2012-12-18 Member: 175439Members
    edited July 2013
    For the friction layer, you can probably use ExtraEntitiesMod and the logic functions.
    forums.unknownworlds.com/discussion/123297/extraentitiesmod/p1

    For the custom models, I think a custom skin is enough for learning purposes (and gameplay) because making new models and animations is time consuming.
  • MrGrimMrGrim Join Date: 2013-07-25 Member: 186400Members
    Anyone have a fast track on how to change the view point of a player? Specifically staying in first person but adding effects to the screen.
  • TharosTharos Join Date: 2012-12-18 Member: 175439Members
    An effect like the lerk poison ? You should take a look at GUIPoisonedFeedback.lua it's called by marine_client.lua with this code :
    local function UpdatePoisonedEffect(self)
    
        local feedbackUI = ClientUI.GetScript("GUIPoisonedFeedback")
        if self.poisoned and self:GetIsAlive() and feedbackUI and not feedbackUI:GetIsAnimating() then
            feedbackUI:TriggerPoisonEffect()
        end
        
    end
    
  • SamusDroidSamusDroid Colorado Join Date: 2013-05-13 Member: 185219Members, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Gold, Subnautica Playtester, NS2 Community Developer, Pistachionauts
    There are effects you can trigger on the screen like vortex, etc... don't remember exactly where it it though.
Sign In or Register to comment.