Jump to content

SciGuy42

Community Members
  • Posts

    72
  • Joined

  • Last visited

  • Days Won

    2

SciGuy42 last won the day on July 17 2021

SciGuy42 had the most liked content!

1 Follower

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

SciGuy42's Achievements

Discens

Discens (2/14)

109

Reputation

  1. Mission 12 is now converted and re-vamped for a25. Thanks all for the help and of course, thanks to the original creator of the city that Alexander conquers in this scenario.
  2. Thanks, yeah, I figured I was just exploiting a bug The code example helped, I now know how to use modifiers directly from code, it's pretty cool.
  3. I am still working on converting the missions -- so far, up to mission #11 are converted. However, I ran into an issue in terms of backwards compatibility. In many of the scenarios, the starting technologies are predefined. In the previous version, if I add a technology twice, I get twice the effects. So for example, the following code would add 30% to the international trade bonus as the tech itself adds 10%: for (let k = 0; k < 3; k ++) cmpTechnologyManager.ResearchTechnology("trade_commercial_treaty"); Now, this no longer works -- only the first time does the effect take hold. Would it be possible for me to edit some code to make sure that each time the ResearchTechnology function is called, the effects of the tech are triggered even if the tech has already been researched? Does anyone know where that code would be? Thanks.
  4. Mission 10 is now converted to a25 as well -- The Sacking of Thebes. You get to sack the city of Thebes which rebelled against Macedonian rule. But first, you must destroy its farms and storehouses, secure the blessing of the nearby temples and ideally, find siege equipment to help break through the city's defenses. As you make progress, reinforcements will arrive to help you with the task. If anyone wants to contribute to the design of the city itself, please let me know. There is definitely room for improvement (you'd just need to keep roughly the same number of towers and fortresses).
  5. So I take it that the change was intended, thanks I'd still wish it worked as it did before, there is one other mission where I think this dynamic is important. If anyone can point me to the code of how that was implemented before, please do, for this mission it was intended.
  6. Missions 8 and 9 have now been converted and remastered for a25. Following are some screen shots from Mission 9, which is largely a naval/coastal adventure of battle and exploration. By the way, it used to be that when you capture a Gaia lighthouse, all coastal areas become revealed. Now that trigger doesn't seem to work, nothing happens when capturing the lighthouse. Was that change intentional?
  7. Good to know it's fixed! But is there really no way I can install the very latest build without building it myself? If you do have instructions on how to build from source, do share, thanks!
  8. With the help of nwtour, I have now converted the first 6 missions to a25. It went a bit slow initially as I was figuring out what has changed, hopefully it will go faster from now on.
  9. Great, it now works! Now back to the conversion, will report any other bugs if I encounter them.
  10. I assume I had to replace with the file on the right. After I did that, I am now getting the following error when a unit gets close to the trigger point, tested with both my scenario and the Trigger Demo: ERROR: JavaScript error: simulation/components/Trigger.js line 346 this.triggers.triggers is undefined Trigger.prototype.CallTrigger@simulation/components/Trigger.js:346:6 TriggerPoint.prototype.OnRangeUpdate@simulation/components/TriggerPoint.js:75:13
  11. Do you mean remove the word Action when registering the trigger but still keep the function as RangeAction? Or remove Action from both the name when registering the trigger as well as from the function name?
  12. I also tested the trigger demo scenario. Before I replaced the Trigger.js file, I was getting errors, now the errors are gone except for the OnRange trigger in that example scenario.
  13. Thanks, the interval action now seems to be working as expected. However, the OnRange trigger is still giving me the same error once the unit gets close to the trigger point: WARNING: Trigger.js: called a trigger 'RangeAction' for event 'OnRange' that wasn't found!!! I added the !!! at the end just to verify that it is using the new file.
  14. Unfortunately I am also having trouble with the simple IntervalAction trigger. I register the trigger as per the tutorial with no issues: cmpTrigger.RegisterTrigger("OnInterval", "IntervalAction", { "enabled": true, "delay": 10 * 1000, "interval": 5 * 1000, }); The action is defined as: Trigger.prototype.IntervalAction = function(data) { warn("The OnInterval event happened with the following data:"); warn(uneval(data)); }; Then 10 seconds in the game, I get this error: WARNING: Trigger.js: called a trigger action 'undefined' that wasn't found I think I followed everything from the trigger_demo.js example to the tee as before.
  15. I am trying to upgrade my campaign to a25 and have found that OnRange triggers must have changed somehow. I first defined the trigger using the following code: cmpTrigger.RegisterTrigger("OnRange", "RangeAction", { "entities": cmpTrigger.GetTriggerPoints("A"), // central points to calculate the range circles "players": [1], // only count entities of player 1 "maxRange": 40, "requiredComponent": IID_UnitAI, // only count units in range "enabled": true, }); I have a simple RangeAction defined as: Trigger.prototype.RangeAction = function(data) { warn("The OnRange event happened with the following data:"); warn(uneval(data)); }; When I load the scenario I get no errors upon loading but then when I move the unit close to the trigger point, I get the following error: WARNING: Trigger.js: called a trigger 'RangeAction' for event 'OnRange' that wasn't found Note that I am following the example in: /maps/scenarios/trigger_demo.js I cannot spot any difference between how the trigger_demo.js uses the OnRange trigger and mine. Any clues? I am also including the .js file here. Macedonia_2.js
×
×
  • Create New...