[REQ] 2.2 Sector modding aspects

[REQ] 2.2 Sector modding aspects

  • Hey, Guest! We’re glad you are a part of the Paradox Community and want to know what you think about it. Please let us know by filling out this short survey. We appreciate it!
  • Crusader Kings III Available Now!

    The realm rejoices as Paradox Interactive announces the launch of Crusader Kings III, the latest entry in the publisher’s grand strategy role-playing game franchise. Advisors may now jockey for positions of influence and adversaries should save their schemes for another day, because on this day Crusader Kings III can be purchased on Steam, the Paradox Store, and other major online retailers.


    Real Strategy Requires Cunning

Iyur

icddppl
20 Badges
Apr 2, 2014
729
45
  • Crusader Kings II
  • Imperator: Rome
  • Stellaris: Apocalypse
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Imperator: Rome Sign Up
  • Stellaris: Megacorp
  • Cities: Skylines Industries
  • Stellaris: Distant Stars
  • Cities: Skylines - Parklife
  • Cities: Skylines - Parklife Pre-Order
  • Stellaris: Humanoids Species Pack
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Hearts of Iron IV Sign-up
  • Stellaris
  • Cities: Skylines
  • Stellaris: Synthetic Dawn
  • Cities: Skylines Deluxe Edition
I'm sorry for creating this thread outside the modding sandbox, but the sectors' hypetrain is going on right here, so there is a bit more chances to attract devs' attention.

Well, despite a lot of complaints about sector creation mechanic I'd say that I like the way of new sector geographical mechanics (it has issues, but it has a lot of potential as well, as I saw the modding part of this). But the problem is much more bigger in other aspects. Some changes have been made exactly to the sector scope. We've already got some concerns while were looking on modding changelog in the last DD as we've noticed that sector scope was removed from the effects and triggers. From the other side, it's not completely removed - you still can check existing of sector scope, switch to random_sector etc. But it doesn't work properly:

0. The sector scope seems broken now. Below there is a list of specific issues, but in general it has unobvious behavior. And the saddest thing, is that game sometimes doesn't understen pure scope, especially I really miss an option for faction, to add sector as parameter, to restrict faction joing only for specific sector. Now it doesn't work, it shows no errors though:
Code:
    parameters = {
        sector = {
            type = sector
            valid_objects = { ... }
        }
    }
1. Seems, that sector now has no identification, like other game instance. Previosly, you were able to script something like this code and get system_id_5453 and sector_id_3583 as expected. Currently, using sector scope in flags returns only 0. This is really crucial for a lot of modding aspects, to keep sector's info and data in external scope linking it through id, operate with sectors and so on.
Code:
set_planet_flag = system_id_@solar_system
set_planet_flag = sector_id_@sector
2. We can't get sector's name. It shows nothing when we're trying to output it into localisation or log. Scoping via every_sector won't help:
Code:
log = "[Root.Sector.GetName]"
every_owned_sector = { log = "[This.GetName]" }
3. The lack of small modding possibilities, i.e. to track sector capital (really strange, the game shows icon on sector's capital planet, but we have no trigger to check it), to add/remove systems, to give some resources, to assign a governor (really why it's not done? like assigning admirals). But this is the last thing to be fixed, the problems above is much more important.

I really don't want to press on devs as I think the game becomes much better, but some new improvements just have erased what was before... And I think fixing this modding possibilities could significantly help community to create a lot of interesting mod and invent some cool stuff related to sectors.

Thanks for your time, feel free to support this topic.
 
Last edited:

Iyur

icddppl
20 Badges
Apr 2, 2014
729
45
  • Crusader Kings II
  • Imperator: Rome
  • Stellaris: Apocalypse
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Imperator: Rome Sign Up
  • Stellaris: Megacorp
  • Cities: Skylines Industries
  • Stellaris: Distant Stars
  • Cities: Skylines - Parklife
  • Cities: Skylines - Parklife Pre-Order
  • Stellaris: Humanoids Species Pack
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Hearts of Iron IV Sign-up
  • Stellaris
  • Cities: Skylines
  • Stellaris: Synthetic Dawn
  • Cities: Skylines Deluxe Edition
It's 2.2.4 for now and I'm back for this topic again.

There is a strange faction mechanic: when I've configured my custom faction type to have multiple copies by using unique = no I still have only one of this type even with segregation parameters:
Code:
regionalist = {

    unique = no
    support_multiplier = 1

    resources = {
        category = pop_factions
        produces = {
            influence = 2
        }
    }

    # This = Country
    is_potential = {
        always = yes
    }
  
    # This = Country
    parameters = {
        capital = {
            type = planet
            filter = owned
            valid_objects = {
                exists = sector
                has_owner = yes
                owner = { is_same_empire = root }
            }        
        }
    }

    valid = {
        parameter:capital = {
            debug_scope_type = planet
            exists = sector
            owner = { is_same_empire = root.owner }
        }
    }

    # This = Pop
    can_join_faction = {
        # Global rules for pops, which can join the faction
        pop_can_politics = yes
    }

    # This = Pop
    attraction = {

        base = -1

        modifier = {
            add = 9999
            exists = planet
            # attraction is only on matching planet
            planet = { is_same_value = parameter:capital }
        }

    }

    ...

}

Logs are correct, factions.showattraction command shows the five possible instances of this faction type. But in general, spawns only one, including pops from different planets which is contrary to declared config.



So, here we're coming to the next problem. If we change the parameter to sector scope, it won't work at all - faction won't be spawned for unknown reason, as I've got no errors in logs.
Code:
    parameters = {
        region = {
            type = sector
            filter = owned
            valid_objects = {
                has_owner = yes
                owner = { is_same_empire = root }
            }        
        }
    }

Or maybe I'm doing something wrong?

@Guraan @LordMune @Jamor @Moah , I understand that you all are really busy, but could you bring some light on this problems? Thank you in advance.