Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Aldorn

Pages: [1] 2 3 ... 50
1
Thanks for your answers!

2
OXCE Suggestions DONE / Re: [DONE] [Suggestion] Geoscape pop-up events
« on: December 16, 2023, 03:07:11 am »
More attributes added for events:

1. music - String ID of the music to play when this event pops up on the Geoscape.
2. everyItemList - A list of item IDs. When this event pops up they are all transferred to the HQ (within 1 hour).
3. randomItemList - A list of item IDs. When this event pops up one of them is selected randomly and transferred to the HQ (within 1 hour).
4. weightedItemList - A weighted list of item IDs. When this event pops up one of them is selected randomly (respecting given weights) and transferred to the HQ (within 1 hour).

Attributes itemList and randomItem have been deprecated (and will be removed in oxce 6.2).

Edit:

5. everyMultiItemList - A list of item IDs and their quantities. When this event pops up they are all transferred to the HQ (within 1 hour).
All these new features are really wonderful  ::)

I hope you know that OpenXCom and OXCE are the best remastered game ever (in this I include both: the best game, and the best way to remaster a game)



I would have a question about eventScripts >> facilityTriggers

Definition of facilityTriggers is: A list of base facilities that can influence the execution of this script. Similar to research triggers; checks the presence of a facility (in any xcom base).

Apparently, it does not wait for a facility to be built. As soon as you build it, event is triggered, even if the facility will be available/functional in 1 month

Is it expected, or do I miss something?

Code: [Select]
eventScripts:
  - type: STR_TRAINING_TICKET_MONTHLY_EVENT_SCRIPT
    facilityTriggers:
       STR_TRAINING_ROOM
    eventWeights:
      0:
        STR_TRAINING_TICKET_MONTHLY_EVENT: 100
    #firstMonth: 0
    #lastMonth: -1
    executionOdds: 100

EDIT: in fact, I think what I wrote does not work, as it triggers even if I don't build anything

I made other attempts writing it differently, unsuccessfully (i.e., the event is triggered after the first hour):
Removing 1 space before STR_TRAINING_ROOM
Code: [Select]
eventScripts:
  - type: STR_TRAINING_TICKET_MONTHLY_EVENT_SCRIPT
    facilityTriggers:
      STR_TRAINING_ROOM
Using brackets
Code: [Select]
eventScripts:
  - type: STR_TRAINING_TICKET_MONTHLY_EVENT_SCRIPT
    facilityTriggers: [STR_TRAINING_ROOM]
Do as for researchTriggers
Code: [Select]
eventScripts:
  - type: STR_TRAINING_TICKET_MONTHLY_EVENT_SCRIPT
    facilityTriggers:
      STR_TRAINING_ROOM: true

EDIT2: forget that, I will do this differently by adding some research, making training tickets availble for purchase, with a monthlyBuyLimit


3
This new feature is really a good idea   :)

4
OXCE Suggestions DONE / Re: [DONE][Suggestion] Manual Promotions
« on: November 03, 2023, 01:10:16 am »
Really appreciate this new feature, congrats !

5
I made it work

It's not perfect, main inconvenients are:
- the tickets are sent to one Xcom base (Xcom base 1)
- it's a global amount of tickets (I mean, not depending on bases having such a facility)
- the tickets have then to be transferred from base 1 to other bases to be used there
- the transfertime has a minimum of 12 hours (cannot be set to zero or even one hour)

So, finally, I created a ticket for each training type, and will provide 1 ticket per training category each month

It's ok like that, I put this suggestion as solved

Thank you very much for your help, Meridian & Yankee!

And you really do an amazing job here, so many new features and possibilities, QOL, etc. :o I love you both as much as I love SupSuper, Warboy  & Co :)

6
It works, perfect :)

I will still make some attempts, then mark this post as solved if I don't find anything else to improve it

Thanks dude !!

7
Meridian

Following your advice, I created an event system to trigger expected training tickets ("gym event")
1. An eventScript triggers a monthly event
2. This monthly event provides 5 training tickets
3. Training ticket is declared as an item that will be stored in the database (with no attributes, will see later if needed ; I made tests with some attributes but it does not change the error message)
4. Some extraStrings

Spoiler:
eventScripts:
  - type: STR_TRAINING_TICKET_MONTHLY_EVENT_SCRIPT
    facilityTriggers:
       STR_TRAINING_ROOM
    eventWeights:
      0:
        STR_TRAINING_TICKET_MONTHLY_EVENT: 100
    firstMonth: 0
    lastMonth: -1
    executionOdds: 100

events:
  - name: STR_TRAINING_TICKET_MONTHLY_EVENT
    description: STR_TRAINING_TICKET_DESCRIPTION
    everyItemList: [STR_TRAINING_TICKET,STR_TRAINING_TICKET,STR_TRAINING_TICKET,STR_TRAINING_TICKET,STR_TRAINING_TICKET]

items:
  - type: STR_TRAINING_TICKET

extraStrings:
   - type: en-US
     strings:
       STR_TRAINING_TICKET: "Lorem ipsum"
       STR_TRAINING_TICKET_MONTHLY_EVENT: "Lorem ipsum dolor sit amet"
       STR_TRAINING_TICKET_DESCRIPTION: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur."
   - type: fr
     strings:
       STR_TRAINING_TICKET: "Lorem ipsum"
       STR_TRAINING_TICKET_MONTHLY_EVENT: "Lorem ipsum dolor sit amet"
       STR_TRAINING_TICKET_DESCRIPTION: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur."

Then I added this training ticket as required item in soldierTranformations
Spoiler:
soldierTransformation:
# Survival (Health/Reactions)
  - name: STR_TRAINING_SURVIVAL1
    listOrder: 100
    requires: []
    requiresBaseFunc: [BASEFUNC_TRAINING]
    keepSoldierArmor: true
    allowsLiveSoldiers: true
    allowedSoldierTypes: [STR_SOLDIER,STR_VETERAN_SNIPER,STR_VETERAN_GRENADIER,STR_VETERAN_WARRIOR]
    requiredPreviousTransformations: []
    forbiddenPreviousTransformations: [STR_TRAINING_SURVIVAL1,STR_TRAINING_ENDURANCE1]
    cost: 15000
    transferTime: 360
    includeBonusesForMinStats: true
    soldierBonusType: STR_SB_TRAINING_SURVIVAL1
    requiredItems: [STR_TRAINING_TICKET]

Unfortunately, it causes following error message
I tried to change the way to declare requiredItems (with or without brackets, the line after, the line after but with a minus... with same result)
Code: [Select]
F:/OXCE/OXCE V7.8 HellMod/user/mods/HellMod/Ruleset/050_Facilities_TagSoldierTransformation.rul: Error for 'STR_TRAINING_SURVIVAL1': wrong node type, expected a map at line 28
(Line 28 is always the line before the one containing requiredItems; in this case, the line 28 is soldierBonusType: STR_SB_TRAINING_SURVIVAL1; if I put requiredItems just after  name: STR_TRAINING_SURVIVAL1, the involved line will be the one containing name)


Another question (in case I solve error above): would you have any idea how I could delete each month unused training tickets
Meaning: aim is to allow a "maximum" of 5 training per month but do not store unused training tickets
Example:
  Month M: it generates 5 training tickets
  Let's assume I train 2 soldiers, so I consume 2 training tickets (and so 3 remaining training tickets)
  Month M+1: it generates 5 new training tickets
  => I would like to be able to use only 5 training tickets (and not : 8 training tickets = 5 new TT + 3 old TT)

Thanks in advance for your "science"  :D

8
If you want to limit the number of transformations, you can generate "gym tickets" via geoscape events every month and then use them as resources required for the transformation.

Oh god, Geoscape events, very nice!!

I will try that

You shared an example here
https://openxcom.org/forum/index.php/topic,7215.msg116753.html#msg116753

And the ruleset definition contains lots of very useful information
https://www.ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom)#Event_Scripts

Thank you very much

9
I use BaseFunc

Let me share an example

Code: [Select]
facilities:
  - type: STR_TRAINING_ROOM
    spriteShape: 1
    spriteFacility: 111
    buildCost: 800000
    buildTime: 20
    monthlyCost: 8000
    mapName: XBRO_01
    provideBaseFunc: [BASEFUNC_TRAINING]
    refundValue: 400000
    rightClickActionType: 6
    maxAllowedPerBase: 1

soldierTransformation:
  - name: STR_TRAINING_SURVIVAL1
    listOrder: 100
    requires: []
    requiresBaseFunc: [BASEFUNC_TRAINING]
    keepSoldierArmor: true
    allowsLiveSoldiers: true
    allowedSoldierTypes: [STR_SOLDIER,STR_VETERAN_SNIPER,STR_VETERAN_GRENADIER,STR_VETERAN_WARRIOR]
    requiredPreviousTransformations: []
    forbiddenPreviousTransformations: [STR_TRAINING_SURVIVAL1,STR_TRAINING_ENDURANCE1]
    cost: 15000
    transferTime: 360
    includeBonusesForMinStats: true
    soldierBonusType: STR_SB_TRAINING_SURVIVAL1
  - name: STR_TRAINING_SURVIVAL2
    listOrder: 101
    requires: []
    minRank: 2
    requiresBaseFunc: [BASEFUNC_TRAINING]
    keepSoldierArmor: true
    allowsLiveSoldiers: true
    allowedSoldierTypes: [STR_VETERAN_SNIPER,STR_VETERAN_GRENADIER,STR_VETERAN_WARRIOR]
    requiredPreviousTransformations: [STR_TRAINING_SURVIVAL1]
    forbiddenPreviousTransformations: [STR_TRAINING_SURVIVAL2]
    requiredMinStats:
      health: 120
      reaction: 80
    cost: 30000
    transferTime: 720
    includeBonusesForMinStats: true
    soldierBonusType: STR_SB_TRAINING_SURVIVAL2

soldierBonuses:
  - name: STR_SB_TRAINING_FIRING1
    stats:
      firing: 5
  - name: STR_SB_TRAINING_FIRING2
    stats:
      firing: 5
  - name: STR_SB_TRAINING_THROWING1
    stats:
      throwing: 5
  - name: STR_SB_TRAINING_THROWING2
    stats:
      throwing: 5
  - name: STR_SB_TRAINING_MELEE1
    stats:
      throwing: 5
  - name: STR_SB_TRAINING_MELEE2
    stats:
      throwing: 5
  - name: STR_SB_TRAINING_SURVIVAL1
    stats:
      health: 10
      reactions: 5
  - name: STR_SB_TRAINING_SURVIVAL2
    stats:
      health: 10
      reactions: 5

And I would like to not allow more than x soldiers per month:
- either globally (as does trainingRooms)
- or per soldierTransformation (throufh a "monthlyLimit")

10
Hi,

I had a look at ruleset definition (really great work!) unfortunately I did not find any answer to my need, so I finally decided to ask here

Context: I modded a facility that allows to train soldiers in different manners. I don't want to use standard system that provides a global improvement of soldiers stats, but provides instead some kind of specialization.

Request: I would like to set a monthly limit (i.e., not possible to train more than 5 soldiers per month)

The facility attribute "trainingRooms" doesn't help as it will allow "combat/martial training", that I want to avoid. In fact, I think some kind of "monthlyLimit" per SoldierTransformation should fit this expectation. I know there are already several such attributes for different puposes, as monthlyBuyLimit, etc. (very useful), but I don't know the level of difficulty ot implement it

I don't know if others may be interetested and if it could be considered as interesting/useful by our dear "developpers"

11
Open Feedback / Re: Adding atmospheric music
« on: March 10, 2023, 11:42:09 pm »
Thank you for this Yann, I like the first and second songs, I will try to use them  :)

12
Hi,

I wonder if there is a possibility to apply some kind of "minRank" to items and armors?
Would be useful for example to make powerful weapons/armors require to be sergent or captain to use/wear it

No idea if it's possible to implement this constraint by script, if some of you have ideas how to deal with that request, I'm clearly interested



13
You are right, I will make tests

Thanks for the answers

And congrats for the good job!

14
OXCE Suggestions DONE / Re: [Documentation] Soldier Transformations
« on: February 26, 2023, 03:19:16 pm »
Perfect, thanks for your answer !

15
This is part of oxce already.

Meridian,

I read this full thread, your posts included, but I still would have two question about Commendations and SoldierBonuses

Let's assume I have a commendation as follow:
10 levels of commendation with 4 levels of bonuses:
- Commendation L1 to L4 => SoldierBonus L1
- Commendation L5 to L7 => SoldierBonus L2
- Commendation L8 to L9 => SoldierBonus L3
- Commendation L10 => SoldierBonus L4

Code: [Select]
commendations:
  - type: STR_COMMENDATION_ALIENS_KILLED #Total number of kills across a soldier's career that meet the specified criteria
    description: STR_COMMENDATION_ALIENS_KILLED_DESCRIPTION
    sprite: 1
    criteria:
      killsWithCriteriaCareer: [10, 20, 30, 40, 50, 75, 100, 200, 300, 500]
    soldierBonusTypes: [STR_SB_COMMENDATION_ALIENS_KILLED1, STR_SB_COMMENDATION_ALIENS_KILLED1, STR_SB_COMMENDATION_ALIENS_KILLED1, STR_SB_COMMENDATION_ALIENS_KILLED1, STR_SB_COMMENDATION_ALIENS_KILLED2, STR_SB_COMMENDATION_ALIENS_KILLED2, STR_SB_COMMENDATION_ALIENS_KILLED2, STR_SB_COMMENDATION_ALIENS_KILLED3, STR_SB_COMMENDATION_ALIENS_KILLED3, STR_SB_COMMENDATION_ALIENS_KILLED4]
    killCriteria:
      -
        - [1, ["STATUS_DEAD", "FACTION_HOSTILE"]]

soldierBonuses:
  - name: STR_SB_COMMENDATION_ALIENS_KILLED1
    stats:
      tu: 5
  - name: STR_SB_COMMENDATION_ALIENS_KILLED2
    stats:
      health: 5
  - name: STR_SB_COMMENDATION_ALIENS_KILLED3
    stats:
      tu: 5
  - name: STR_SB_COMMENDATION_ALIENS_KILLED4
    stats:
      health: 5

Questions:
1) Do I need to declare
Code: [Select]
soldierBonusTypes: [STR_SB_COMMENDATION_ALIENS_KILLED1, STR_SB_COMMENDATION_ALIENS_KILLED1, STR_SB_COMMENDATION_ALIENS_KILLED1, STR_SB_COMMENDATION_ALIENS_KILLED1, STR_SB_COMMENDATION_ALIENS_KILLED2, STR_SB_COMMENDATION_ALIENS_KILLED2, STR_SB_COMMENDATION_ALIENS_KILLED2, STR_SB_COMMENDATION_ALIENS_KILLED3, STR_SB_COMMENDATION_ALIENS_KILLED3, STR_SB_COMMENDATION_ALIENS_KILLED4]
or may I perhaps make it shorter
Code: [Select]
soldierBonusTypes: [STR_SB_COMMENDATION_ALIENS_KILLED1, , , , STR_SB_COMMENDATION_ALIENS_KILLED2, , , STR_SB_COMMENDATION_ALIENS_KILLED3, , STR_SB_COMMENDATION_ALIENS_KILLED4]
or even another solution ?


2) In given example, will the 10th level of Commendation provide cumulative bonus of
- tu +10
- health +10

or only the bonus attached to the 10th level
- health +5

Said differently, if I want a cumulative result, would I have to declare
Code: [Select]
soldierBonuses:
  - name: STR_SB_COMMENDATION_ALIENS_KILLED1
    stats:
      tu: 5
  - name: STR_SB_COMMENDATION_ALIENS_KILLED2
    stats:
      tu: 5
      health: 5
  - name: STR_SB_COMMENDATION_ALIENS_KILLED3
    stats:
      tu: 10
      health: 5
  - name: STR_SB_COMMENDATION_ALIENS_KILLED4
    stats:
      tu: 10
      health: 10

(It may have to do with reset option, but not sure how to make it work properly)

PS: Commendation and SoldierBonuses modding is really great  ::)

Pages: [1] 2 3 ... 50