Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

πŸ’» Creation of Mods – Ready Codes and Data Sticky

A topic by Justin Player created 53 days ago Views: 11,371 Replies: 8
Viewing posts 1 to 10
(11 edits) (+4)(-1)

Code removed

Reason: The other code now also has the old functions of this

(4 edits) (+7)

-- Simple editing code, with organized automation, variable corrections, facilitators and support for huge texts. 


-- My Dystopian Robot Girlfriend

-- TextMeshPro / HTML

-- ModUtilities

-- Database AI | memory!released

-- 95.15

-- beta v2



-- The mod has effects color automation 

-- Easy letter size change 

-- Easy color change 

-- Automatic lines


-- VARIABLE INFORMATION IS STORES BELOW THE CODE ENGINE


-- ===========================

-- EDIT ONLY THIS SECTION

-- ===========================


local SHOP = [[pharmacy]] -- grocery

local CATEGORY = ItemCategory.Meds -- food

local STACKABLE = true


-- You don't need to create a "itensDaLoja" location for each item


--For Add items, remember to put a comma. The last item does not need a comma. 


-- Copy the second code from start to finish {} 


local itensDaLoja = {

    {

        name = [[✚ [NANO-MC] Sheep TLP ✚]],

        nameColor = "#0F0", 

        

        

        Disc1 = [[Military Use]],

        Disc1Color = "#00FF88",

        Disc1Size = 20,

        Disc1Bold = true,


      

        Disc2 = [[Nano-Recomposer]],

        Disc2Color = "#66CDAA",

        Disc2Size = 18,


      

        Disc3 = [[CorpNano © 2027]],

        Disc3Color = "#69F0AE",

        Disc3Size = 14,

        Disc3Italic = true,


        price = 50,

        effects = { Health = 1.0, Stamina = 1.0, Satiation = 1.0 }

    },


    {

        name = [[⛃ [CHIP-MC] Money ⛃]],

        nameColor = "#0FF", 

        

        Disc1 = [[Chip β‚£]],

        Disc1Color = "#00FF88",

        Disc1Size = 20,

        Disc1Bold = true,


        Disc2 = [[test]],

        Disc2Color = "#66CDAA",

        Disc2Size = 18,


        Disc3 = [[CorpNano © 2027]],

        Disc3Color = "#69F0AE",

        Disc3Size = 14,

        Disc3Italic = true,


        price = 50,

        effects = { money = 2147483647, casinoTokens = 2147483647 }

    }



--================================================



-- ===========================

-- SCRIPT ENGINE (DO NOT ALTER)

-- ===========================


local COLOR_MAP = {

  -- ANON (MC)

  health = "#00FF00",

  stamina = "#FFD700",

  satiation = "#FF3B3B",

  mentalhealth = "#00E5FF",


-- DICK

  remainingcum = "#E91E63",

  maxcum = "#FF80C0",

  deathgripeffectend = "#7E57C2",

  vinegaraeffectend = "#AEEA00",


  -- JUN (BOT)

  mood = "#FF9800",

  lust = "#D500F9",

  sympathy = "#3F51B5",

  horniness = "#FF1744", 

  currenthorniness = "#FF1744",

  longing = "#F48FB1",

  intelligence = "#2196F3",

  stage = "#651FFF",


  -- FINANCIAL / SOCIAL

  money = "#00C853",

  casinotokens = "#00B0FF",

  followers = "#FF6D00",

  subs = "#FBC02D",


  -- SYSTEM

  time = "#B0BEC5",

  weeklyrent = "#90A4AE",


  -- LORE




}


do

    if not ModUtilities then return end


    local function ApplyStyle(text, color, size, bold, italic)

        if not text or text == "" then return "" end

        local formatted = text

        if bold then formatted = "<b>" .. formatted .. "</b>" end

        if italic then formatted = "<i>" .. formatted .. "</i>" end

        return string.format("<size=%d><color=%s>%s</color></size>", size or 16, color or "#FFFFFF", formatted)

    end


    local function GenerateDescription(data)

        local desc = ApplyStyle(data.Disc1, data.Disc1Color, data.Disc1Size, data.Disc1Bold, false) .. "\n"

        desc = desc .. ApplyStyle(data.Disc2, data.Disc2Color, data.Disc2Size, false, false) .. "\n"

        

        desc = desc .. "<color=#FFFFFF><size=16>─────────────────────</size></color>\n"

        desc = desc .. "<size=16><color=#00FFFF> Β«EFFECTSΒ»</color></size>\n"

        

        for stat, value in pairs(data.effects) do

            

            local color = COLOR_MAP[string.lower(stat)] or "#FFFFFF"

            local signal = value > 0 and "+" or ""

            local displayValue = ""

            

            if math.abs(value) <= 1.0 and stat:lower() ~= "intelligence" and stat:lower() ~= "money" and stat:lower() ~= "followers" and stat:lower() ~= "subs" then

                displayValue = signal .. (value * 100) .. "%"

            else

                displayValue = signal .. value

            end


            desc = desc .. string.format("<size=16><color=%s>%s β†’ %s</color></size>\n", color, stat, displayValue)

        end

        

        desc = desc .. "<color=#FFFFFF><size=16>─────────────────────</size></color>\n"

        desc = desc .. ApplyStyle(data.Disc3, data.Disc3Color, data.Disc3Size, false, data.Disc3Italic)

        

        return desc

    end


    for _, data in ipairs(itensDaLoja) do

        local prefab = ModUtilities.CreateItemPrefab()

        

        prefab.Name = string.format("<color=%s>%s</color>", data.nameColor or "#FFFFFF", data.name)

        prefab.Description = GenerateDescription(data)

        prefab.Price = data.price or 0

        prefab.Category = CATEGORY

        prefab.IsStackable = STACKABLE


        prefab.OnUse = function()

            if data.effects then

                for stat, value in pairs(data.effects) do

                    local current = gv[stat] or 0

                    gv[stat] = current + value

                    

                    local limitedStats = {Health=1, Stamina=1, Satiation=1, MentalHealth=1, Mood=1, Horniness=1, Longing=1, CurrentHorniness=1}

                    if limitedStats[stat] then

                        if gv[stat] > 1 then gv[stat] = 1 end

                        if gv[stat] < 0 then gv[stat] = 0 end

                    end

                end

            end

            return true

        end


        local item = ModUtilities.CreateNewItemAutoAssignId(CurrentModGuid, prefab)

        ModUtilities.AddGenericItemToShop(SHOP, item)

    end

end

(+3)

Scenario creation

(1 edit) (+3)

 This is a simple frame animation code. It still needs polishing. I have another version of this code that works better, but it loses a lot of performance.

 The code below is for performance... I don't know how to make something lighter than this yet..

--

do


 


  local catSprites = {}


  for i = 0, 99 do


    --


    local frameName = string.format("frame_%03d_delay-0.01s.png", i)


    catSprites[i] = ModUtilities.GetSpriteReference(CurrentModGuid, frameName)


  end




  local unityCoro3utine




  


  function catSpecialEffect(value, item0)


    local itemGuid = item0.GetUniqueGuid()


    local targetPath = "/Room/GhostBackground"




    if value and item0.IsEquipped() then


      


      function Coroutine()


        while true do


        


          for i = 0, 99 do


            if catSprites[i] then


              TextureOverriderManager.RoomManager.SetSprite(itemGuid, targetPath, catSprites[i])


            end


         


            coroutine.yield(ModUtilities.WaitForSeconds(0.1))


          end


        end


      end


      unityCoroutine = ModUtilities.StartCoroutine(Coroutine)


    else


 


      if unityCoroutine then


        ModUtilities.StopCoroutine(unityCoroutine)


        unityCoroutine = nil


      end


      TextureOverriderManager.RoomManager.RestoreSprite(itemGuid, targetPath)


    end


  end

(2 edits) (+3)

(1 edit) (+4)

There are many things here, we haven't been able to use even half of them yet... these are basically the rules we must follow for the code to work, others are auxiliaries and functions that already exist.

__require_clr_impl__require_clr_impl

_G

_MOONSHARP ,πŸ‘ˆ

_VERSION

AllowedModifiers

assert

AtLeastOneBoolVariableTrueRequirement

bit32

ChangeLightMultiply

ChangeMorningLight

CheckType

collectgarbage

ColorPalette

ColorPaletteEntry

ColorPaletteManager

ColorSlot

CommonAllowedModifiersEnum

ControllerEnum

CookingSong

CookingSongRuntimeData

coroutine

CurrentModGuid

debug

dofile

dynamic

EdibleItemNutritionProfile

EdibleItemPrefabData

EdibleTypeEnum

error

FinishedType

FishingBaitItemPrefabData

FishingBaitType

FishingCatchBehaviourType

FishingRodItemPrefabData

FishItemPrefabData

FishPreferences

fungus

GameId

GameUtilities

getmetatable

GlobalFlag

Guid

ipairs

Item

item0

ItemCategory

ItemEnum

ItemModifiableVariableFactory

ItemModifiableVariablesRequirement

ItemPrefab

itemprefab0

ItemPrefabManager

ItemScopeCondition

ItemScopeConditionAlwaysTrueCondition

ItemScopeConditionCustom

ItemScopeConditionSpecialVariable

ItemSlot

json

LightMultiply

Live2DControllerSingleton

load

loadfile

loadfilesafe

loadsafe

math

ModUtilities

MorningLight

NewsId

next

NoteButtonTypeEnum

os

pack

package

pairs

pcall

print

R

rawequal

rawget

rawlen

rawset

Recipe

require

Result

SaveContainer

SaveSingleton

ScratchTextureType

select

setmetatable

Shop

ShopItem

ShopManager

SimpleLocalizedString

SingleArgumentComparators

SlotEquipData

SlotManager

SlotType

SoundSingleton

StoryAutoBranch

StoryBlockTarget

StoryBotContainerTypeEnum

StoryBotDialogueBranch

StoryBranchTarget

StoryCondition

StoryEnumeratorTarget

StoryLocalizedConversationBranchTarget

StoryMenuBranch

StorySingleton

string

SusArea

SusModifier

table

TextureOverriderManager

TimeCheckType

tonumber

tostring

TwoArgumentComparators

type

UiOverlay

unpack

ViewSingleton

xpcall

(2 edits) (+3)

Mc


gv.playerName


gv.Stamina (-1.0 to +1.0): Sleep/fatigue bar


gv.Satiation (-1.0 to +1.0): Satiety/hunger level.


gv.Health (-1.0 to +1.0): Total physical health.


gv.MentalHealth (-1.0 to +1.0): Mental health.


gv.MentalHealthTemporary (-): Defines a temporary change in mental health.


--


gv.remainingCum(Β±): Amount of semen stored (measured in ml).


gv.maxCum(Β±): Maximum semen storage capacity (measured in ml).


gv.deathGripEffectEnd (Β±Time): Duration of the "Death Grip" effect. While active, makes ejaculation more difficult.


 gv.vinegaraEffectEnd (Β±Time): Duration of the "Vinegara" effect. While active, it forces the player to have an erection.


Financial


gv.money: Total money balance

Measured in ($)


gv.casinoTokens: Amount of chips for the casino.


gv.weeklyRent: Amount of weekly rent the player must pay. Example:


Measured in ($)


Streaming Account (CockTwitch)


gv.followers: Followers.


gv.subs: Paid followers.


=============================

BOT


gv.botName: Defines the Bot's name.


gv.sympathy(Β±): What it is: Affection/Care, the way the Bot treats you or perceives you.


 gv.mood(Β±1.0):


gv.longing(Β±10.0):


gv.lust(Β±): Bot's sexual desire. Defines whether it will seek you out for sex, also activates a flag.


gv.currentHorniness(Β±1.0): Defines the robot's immediate arousal level at the exact moment of interaction.


gv.intelligence (0 to 40): Bot's intelligence level, linked to the stage.


gv.stage (0 to 3): Defines the current stage of the Bot's AI.


---------


gv.nunPoints: Defines the level of affinity with the Nun.


gv.priestBotPoints: Defines the level of influence or favor.


 Data


gv._cumInsideStomach (0.0):


gv._cumInside (0.0):


gv._cumInsideAnal (0.0):


lastWorkedAtDay

What it is: The last day the player worked.


lastWentToChurchAt

What it is: Timestamp (tick) of the last time the player went to church.


lastCuddledAt

What it is: Timestamp of the last cuddling with the bot.


lastSleptWithBot

What it is: (true/false). Indicates if the player slept with the bot on the last occasion.


lastWokeUpAt

What it is: Timestamp of the last time the player woke up.


lastFuckedAt

What it is: Timestamp of the last time there was sexual intercourse.


lastInteractAt

What it is: Timestamp of the last interaction with the Bot.


 lastEquipmentAt

What it is: Timestamp of the last time the player changed/adjusted equipment.


lastOutsideWithBotAt

What it is: Timestamp of the last time the player went outside/used the bot.


lastStreamedAt

What it is: Timestamp of the last time the player streamed (CockTwitch).


lastTalkedAt

What it is: Timestamp of the last conversation (conversation initiated by the player).


lastBotStartedTalkAt

What it is: Timestamp of the last time the bot started a conversation.


lastHeadpatedAt

What it is: Timestamp of the last time you "headpatted" the bot.


lastHungerInfoAt

What it is: Timestamp of the last hunger-related update or notification.


lastMentalHealthInfoAt

What it is: Timestamp of the last time mental health information was recorded/updated.


======================

Advanced. 

how to edit code for mc i don't understand 

Could you explain? I don't understand... Do you talk about the protagonist? You can edit his appearance.

I haven't posted yet because it's still coming up a lot of things, the devs are optimizing the game a lot.