Jump to content
Age of History 3
  • 0
Shacore

Function for events overtime

Question

I want to make a mod that increase the price of certain resource overtime(for example every X years starting from year Y), i think its possible through events but i dont know how to include the code, what language i need and how would i combine it with events variables. Maybe someone can give me an example?

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

i tried this(to increase price of grain once) and sometimes event doesnt even occur and when it occurs it does absolutely nothing, just the window pops up but the price is still the same

id=domojega
title=domojegas
desc=domojegass

popUp=true

image=economy.png

show_in_missions=true
mission_image=3

only_once=true

trigger_and
next_and
exact_day=1=1=2025
trigger_and_end

option_btn
name=Accept the price increase
price_change_up=0=20=5=120=1  
ai=100
option_end

this is logs.txt
 

java.lang.NumberFormatException: For input string: "1  "
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
    at java.lang.Integer.parseInt(Integer.java:580)
    at java.lang.Integer.parseInt(Integer.java:615)
    at aoc.kingdoms.lukasz.events.EventsManager.loadEvent(EventsManager.java:2618)
    at aoc.kingdoms.lukasz.events.EventsManager.loadEvents(EventsManager.java:1094)
    at aoc.kingdoms.lukasz.events.EventsManager.loadEvents(EventsManager.java:1025)
    at aoc.kingdoms.lukasz.menus.InitGame.initGame(InitGame.java:1046)
    at aoc.kingdoms.lukasz.menus.InitGame.draw(InitGame.java:93)
    at aoc.kingdoms.lukasz.menu.MenuManager.draw(MenuManager.java:2076)
    at aoc.kingdoms.lukasz.menu.MenuManager.draw(MenuManager.java:1982)
    at aoc.kingdoms.lukasz.jakowski.Renderer.Renderer.renderUI(Renderer.java:572)
    at aoc.kingdoms.lukasz.jakowski.Renderer.Renderer.render(Renderer.java:550)
    at aoc.kingdoms.lukasz.jakowski.AA_Game.render(AA_Game.java:213)
    at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Window.update(Lwjgl3Window.java:430)
    at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.loop(Lwjgl3Application.java:181)
    at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.<init>(Lwjgl3Application.java:153)
    at aoc.kingdoms.lukasz.jakowski.desktop.DesktopLauncher.main(DesktopLauncher.java:108)
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    at java.util.ArrayList.rangeCheck(ArrayList.java:657)
    at java.util.ArrayList.get(ArrayList.java:433)
    at aoc.kingdoms.lukasz.menusInGame.InGame_Event.<init>(InGame_Event.java:83)
    at aoc.kingdoms.lukasz.menu.MenuManager.rebuildInGame_Event(MenuManager.java:4510)
    at aoc.kingdoms.lukasz.events.EventsManager$9.update(EventsManager.java:846)
    at aoc.kingdoms.lukasz.jakowski.Game.updateSimpleTask(Game.java:1560)
    at aoc.kingdoms.lukasz.jakowski.Renderer.Renderer.update(Renderer.java:849)
    at aoc.kingdoms.lukasz.jakowski.Renderer.Renderer.render(Renderer.java:503)
    at aoc.kingdoms.lukasz.jakowski.AA_Game.render(AA_Game.java:213)
    at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Window.update(Lwjgl3Window.java:430)
    at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.loop(Lwjgl3Application.java:181)
    at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.<init>(Lwjgl3Application.java:153)
    at aoc.kingdoms.lukasz.jakowski.desktop.DesktopLauncher.main(DesktopLauncher.java:108)


 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Age of History Games