Ok, i'll answer in order. it will be a long post, if you want to skip the things i have tryed to make so far, scroll until the red line.
About palace.
Maybe you can show some code with the Palace?
I don't promise, but maybe I can do something...
That is what i have taken from the code, and what i have understood about it.
ietch:
Inherits: ^Building
Inherits@PRIMARY: ^PrimaryBuilding
Tooltip:
Name: actor-sietch-name
RallyPoint:
CommandBarBlacklist:
DisableStop: false
D2kBuilding:
Footprint: xx xx
Dimensions: 2,2
TerrainTypes: Cliff
Health:
HP: 60000
Armor:
Type: wood
RevealsShroud:
Range: 10c0
RenderSprites:
Image: palace.ordos
FactionImages:
atreides: palace.atreides
fremen: palace.atreides
harkonnen: palace.harkonnen
corrino: palace.corrino
WithBuildingBib:
HasMinibib: True
WithSupportPowerActivationOverlay:
RequiresCondition: !build-incomplete && !launchpad-damaged && harkonnen
GrantConditionOnDamageState@LAUNCHPADDAMAGED:
Condition: launchpad-damaged
Power:
Amount: 20
PrimaryBuilding:
RequiresCondition: atreides || ordos
WithTextDecoration@primary:
RequiresCondition: primary && (atreides || ordos)
ProduceActorPower@fremen:
Name: actor-palace.produceactorpower-fremen-name
Description: actor-palace.produceactorpower-fremen-description
Icon: fremen
PauseOnCondition: disabled
Actors: fremen, fremen
Type: Fremen
ChargeInterval: 2250
EndChargeTextNotification: notification-fremen-ready
ReadyAudio: Reinforce
ReadyTextNotification: notification-reinforcements-have-arrived
BlockedAudio: NoRoom
BlockedTextNotification: notification-no-room-for-new-unit
OrderName: ProduceActorPower.Fremen
SupportPowerPaletteOrder: 20
Exit@1:
SpawnOffset: 0,0,0
ExitCell: 0,2
Exit@2:
SpawnOffset: 0,0,0
ExitCell: 1,2
Production@Atreides:
Produces: Fremen
RequiresCondition: atreides
Production@Ordos:
Produces: Saboteur
RequiresCondition: ordos
GrantConditionOnFaction@Atreides:
Condition: atreides
Factions: atreides, fremen
GrantConditionOnFaction@Harkonnen:
Condition: harkonnen
Factions: harkonnen
GrantConditionOnFaction@Ordos:
Condition: ordos
Factions: ordos, mercenary, smuggler
SupportPowerChargeBar:
RequiresCondition: atreides || harkonnen || ordos
ProvidesPrerequisite@buildingname:
Inherits: ^Building
Inherits@PRIMARY: ^PrimaryBuilding
Tooltip:
Name: actor-sietch-name
RallyPoint:
CommandBarBlacklist:
DisableStop: false
D2kBuilding:
Footprint: xx xx
Dimensions: 2,2
TerrainTypes: Cliff
Health:
HP: 60000
Armor:
Type: wood
RevealsShroud:
Range: 10c0
This part is where it tells that the palace has the base characteristics of a generic building (described in another file), but "Inherits@PRIMARY" and "CommandBarBlacklist" are two entries which i haven't understood, so i does not touched them. The others give information about space occupied, health, armour, and the area in wich it eliminates the fog of war.
RenderSprites:
Image: palace.ordos
FactionImages:
atreides: palace.atreides
fremen: palace.atreides
harkonnen: palace.harkonnen
corrino: palace.corrino
Here lies the main source of my problem, i cannot eliminate or change this without dire consequences (crashes)
WithBuildingBib:
HasMinibib: True
WithSupportPowerActivationOverlay:
RequiresCondition: !build-incomplete && !launchpad-damaged && harkonnen
GrantConditionOnDamageState@LAUNCHPADDAMAGED:
Condition: launchpad-damaged
"HasMinibib" is completely in the land of darkness, while the subsequent lines i think are related to the missile not gettin launched if the palace is damaged, i haven't tried to touch this part yet.
Power:
Amount: 20
PrimaryBuilding:
RequiresCondition: atreides || ordos
WithTextDecoration@primary:
RequiresCondition: primary && (atreides || ordos)
Beside the "Power" entry wich regulates the amount of power the building require/give, i have not idea of the function of the rest.
ProduceActorPower@fremen:
Name: actor-palace.produceactorpower-fremen-name
Description: actor-palace.produceactorpower-fremen-description
Icon: fremen
PauseOnCondition: disabled
Actors: fremen, fremen
Type: Fremen
ChargeInterval: 2250
EndChargeTextNotification: notification-fremen-ready
ReadyAudio: Reinforce
ReadyTextNotification: notification-reinforcements-have-arrived
BlockedAudio: NoRoom
BlockedTextNotification: notification-no-room-for-new-unit
OrderName: ProduceActorPower.Fremen
SupportPowerPaletteOrder: 20
This is the palace power, i left only the Fremen spawning, i have seen i can change the type of unit and theyr number, but most of its inner functions are pure esoteric Omnissaiah secrets.
Exit@1:
SpawnOffset: 0,0,0
ExitCell: 0,2
Exit@2:
SpawnOffset: 0,0,0
ExitCell: 1,2
this is the exit point of the units, trough trial and error i managed to fix it from the center of the sietch (when i simply copy-pasted the barrack code)
Production@Atreides:
Produces: Fremen
RequiresCondition: atreides
Production@Ordos:
Produces: Saboteur
RequiresCondition: ordos
GrantConditionOnFaction@Atreides:
Condition: atreides
Factions: atreides, fremen
GrantConditionOnFaction@Harkonnen:
Condition: harkonnen
Factions: harkonnen
GrantConditionOnFaction@Ordos:
Condition: ordos
Factions: ordos, mercenary, smuggler
SupportPowerChargeBar:
RequiresCondition: atreides || harkonnen || ordos
ProvidesPrerequisite@buildingname:
For me this is totally beyond the grasp of my comprehension, the Omnissaiah denied me the access to this knowledge. I have tried to delete this, but the game crashes, so i left it here.
______________________________________________________________________________________________________________________________
As a solution option.
Just simplified general idea.
(editing right now...)
You can create Fremen with command Create.
(!) Without any resources! So for player side it is too imbalanced.
Before your post i didn't even know what a lua file is. I'll try to copy your code and see if i can do it, looking at the map you linked.
And i thank you very much, at least I owe you an aperitif if you stumble near Venice.
Maybe I'll take me some try, your reply is clear, but my only programming attempt was with a teacher so bad that makes me refusing to learn even the most basics of C++
EDIT
I have made some tries on the map you linked.
The fremen appear exactly as intended, but then tey remain idle near the sietch, I looked at the lua file, but it is a bit too complicated (at least now, is the first time i look at this kind of files).
As for the owner (set to Atreides) does that mean that if i play with an Atreides opponent the spawned fremen belongs to him, and are no more enemy to all?