Here is a sample.rul attached with this post.
It contained everything I have to make this work.
I seek the following feature implementation. At the start of a game, an event pop up, it is an introduction that will give a research for free, so you don't have to do the research again (This part I want to be absolutely clear). You get the research with no string attached. You don't have to manually go to research section and assign scientists to research the topic, once you can see it on ufopedia (in the alien research section) after the event which gave it had unlocked it for you.
My knowledge on eventscripts and event are only as good as, from the existing example provided on this forum and from what info is available in the
https://www.ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom)
In the sample.rul, please modify anything that could allow this feature to be implemented. There is a reason why I ask of this.
The free research will unlocked a few other research topic, which in turn are triggers within the missionscripts that starts off in beginning part of my campaign.
Sorry if I hadn't provide enough information. In your sample code,
researchList: [STR_LASER_PISTOL]
I assume this provide the STR_LASER_PISTOL research for free and completed in research without needing the player to do the research again, or it only unlock the research section in the ufopedia? You still have to research the laser pistol? This part is not explain in detail.
eventScripts:
- type: STR_TEST_EVENT_SCRIPT
eventWeights:
0:
STR_TEST_EVENT1: 90
STR_TEST_EVENT2: 10
6:
STR_TEST_EVENT1: 100
firstMonth: 0
lastMonth: 12
executionOdds: 100
minDifficulty: 0
maxDifficulty: 4
- type: STR_TEST_EVENT_SCRIPT2
eventWeights:
0:
STR_TEST_EVENT2: 100
firstMonth: 0
lastMonth: 12
executionOdds: 100
minDifficulty: 0
maxDifficulty: 4
researchTriggers:
STR_THE_MARTIAN_SOLUTION: true
STR_CYDONIA_OR_BUST: false
events:
- name: STR_TEST_EVENT1
description: STR_TEST_DESCRIPTION1
background: BACK13.SCR
regionList: [STR_NORTH_AMERICA, STR_EUROPE]
city: true
points: 2000
funds: 100000000
itemList: [STR_LASER_PISTOL, STR_SOMETHING_ELSE]
randomItem: false # false = all items from the list are given, true = only one item is given (randomly)
researchList: [STR_LASER_PISTOL]
interruptResearch: STR_LASER_PISTOL
timer: 1700
timerRandom: 60
- name: STR_TEST_EVENT2
description: STR_TEST_DESCRIPTION2
background: BACK01.SCR
# regionList: []
# city: false
points: -2000
funds: -100000000
# itemList: [YYY]
researchList: [STR_LASER_RIFLE]
# interruptResearch: XXX
timer: 2700
timerRandom: 150
extraStrings:
- type: en-US
strings:
STR_TEST_EVENT1: "Political assassination in {0}"
STR_TEST_EVENT2: "Test title"
STR_TEST_DESCRIPTION1: "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."
STR_TEST_DESCRIPTION2: "This one is rather short."
* GeoscapeEvents.zip (1.47 kB - downloaded 40 times.)