Jump to content

Hello, how to make event, if player have Slaves, then ...


Guest

Recommended Posts

Posted

I have problem with my custom job ONLY for Organic slaves, for some reason people don't work! I want to make event like, if you have slaves(for my custom job), then they work, if you don't have slaves, then this work not exist and normal people work on there normal job.

Posted

potential = {

    any_courtier = {                             #courtier' specs below
        trait = branded_slave                 #DW's slave' recognition as example.
        liege = { character = FROM }
    }
}

Posted

Sorry i not get you, where to add this. 

 

here building code and custom job code. ttt - buidling, tty - job

 

03_resource_buildings

 

building_ttt_farm = { 
    base_buildtime = 200    

    resources = {
            category = planet_buildings
            cost = {
        minerals = 200
            }
            upkeep = {
                energy = 2
            }
    }

        triggered_planet_modifier = {
            potential = {
                 exists = owner
            }
        modifier = {
             job_tty_add = 2
        }
        }
}

 

 

 

 

03_worker_jobs

 

###################
# Basic Jobs
###################

tty = {
    category = worker
    condition_string = WORKER_JOB_TRIGGER
    clothes_texture_index = 3
    
    possible = {
        hidden_trigger = { exists = owner }
        worker_job_check_trigger = yes
        owner = { 
            is_fallen_empire_spiritualist = no
                        is_enslaved = yes 
                        is_organic_species = yes
        }
    }

    resources = {
        category = planet_farmers
        produces = {
            food = 10
        }
    }        
    weight = {
        weight = @worker_job_weight
        modifier = {
            factor = 2
            }
}

Posted

I mean like if you have ANY Organic slaves at all.

Posted

Under "weight" add:

 

modifier = {
        factor = 0
        is_enslaved = no
}

 

This should keep normal pops from working those jobs, if that's what you're looking for. There are some other problems with your code though...

Posted

This not worked, all not work, i don't know, i have ideas, but how to make them i don't know. SORRY.I think that i have to make event(if player have slaves then enable custom job, check must be EVERY TICK, if player doesn't have slaves, then BAN custom job). Probable i need (has_slavery_type = #common slaves) - Checks if a species/pop/leader has a particular slavery type in their country. But i need to do this check every game tick, can someone help with that? Like we add boolean variable, if (pop has_slavery_type = #common slaves) then variable = true and...

 

#if variable = true then {

  tty = {
      category = worker
      condition_string = WORKER_JOB_TRIGGER
      clothes_texture_index = 3


      possible = {
          hidden_trigger = { exists = owner }
          worker_job_check_trigger = yes
                  #can_take_servant_job = no
                  is_enslaved = yes 
          owner = { 
                          #is_enslaved = yes, but not owner, workers must be enslaved
                          is_organic_species = yes
          }
      }

      resources = {
          category = planet_farmers
          produces = {
              food = 10
          }
      }        
      weight = {
          weight = @worker_job_weight
          modifier = {
               factor = 2
              }
  }

 

}

Posted

I'm not 100% sure what you're trying to do, but mayby make a custom scripted_trigger for it? Something like:

 

is_possible_to_do_bio_slave_job = {
    hidden_trigger = {
        exists = owner
        owner = { is_gestalt = no }         # If you want hiveminds to work then use this instead: owner = { is_mechanical_empire = no }
        any_owned_pop = {
            is_enslaved = yes
            is_being_purged = no
            is_being_assimilated = no
            is_robot_pop = no
        }
    }
}

 

Then to add it to the job:

 

possible = {
    is_possible_to_do_bio_slave_job = yes
}

Posted
3 minutes ago, Lithia<3 said:

is_possible_to_do_bio_slave_job

thx, i will try but what is (is_possible_to_do_bio_slave_job)?

 

Posted

OK i made script

 

tty_job_check_trigger = {
    custom_tooltip = RULER_JOB_TRIGGER
        hidden_trigger = {
             exists = owner
             owner = { is_mechanical_empire = no }        
             any_owned_pop = {
               is_enslaved = yes
               is_being_purged = no
               is_being_assimilated = no
               is_robot_pop = no
             }
          }
}

 

 

i need to save it like UTF-8 or Unicode?

Posted
1 minute ago, thdsth said:

custom_tooltip = RULER_JOB_TRIGGER

I dont know, i need to add custom_tooltip = tty_JOB_TRIGGER? i need to save it like UTF-8 or Unicode?

Posted

"is_possible_to_do_bio_slave_job" was just an example lol.

 

WORKER_JOB_TRIGGER should work just fine, otherwise you'll have to make your own TTY_JOB_TRIGGER localisation entry.

Posted

i need to save it like UTF-8 or Unicode?

 

Posted

I want to make custom building, this building made for slaves, organic slaves, slaves work in that building, they make food.

NOW ALL WORKERS ARE SERVANTS.

Posted

You should name them something else...otherwise they overwrite the base game files. You should also not edit base game files, if that's what you did.

Posted

OK thx, how better call them? (custom_slave_job), (custom_slave_scripted_triggers_jobs) and (slave_resource_building)

Posted

OK thx, i will be tomorrow, now all works fine, but for some reason even if race not enslaved, it can work as tty.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...