Code Monkey home page Code Monkey logo

javelin's Introduction

Copyright (C) 2015 Alex Henry

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

This program uses rules and monster from the Wizard's of the Coast d20 System Reference Document, released under the Open Gaming License but it does not offer open content of it's own.

Full copies of both licenses are available under the โ€˜docโ€™ directory.

For more information and to keep updated visit https://javelinrl.wordpress.com/

javelin's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

javelin's Issues

Ennemy have the wrong challenge level

Ennemy town guarded by:

2x Azer (challenge lvl 275, stats in the thousands)
3x Doppleganger (challenge lvl 625, stats in the thousands)
1x Eagle (challenge rating 1, normal stats)

Vs player party:

War pony (challenge lvl 26)
Svirfneblin (challenge lvl 13)
Wood elf (challenge lvl 3)

Fight was marked as "easy".
World was 162 days old.
Closing the game and launching the same fight again fixed the challenge lvls (5, 5 and 1).

UI redesign

change everything from awt to javafx

popout windows for towns, etc

Crash during combat: IndexOutOfBoundsException

Happened during worldmap random encounter after everything loaded, when the AI took it's turn (AI was first to play).
Fight was against Lantern Archon x3 (fly, ranged, doom).
I had another fight going fine vs the same mobs with same party.

Log:

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 (class java.lang.RuntimeException)
javelin.controller.ai.ThreadManager.think(ThreadManager.java:68)
javelin.view.screen.BattleScreen.computerTurn(BattleScreen.java:350)
javelin.view.screen.BattleScreen.humanTurn(BattleScreen.java:193)
javelin.view.screen.BattleScreen.step(BattleScreen.java:181)
javelin.view.screen.BattleScreen.mainLoop(BattleScreen.java:166)
javelin.controller.exception.battle.StartBattle.battle(StartBattle.java:65)
javelin.JavelinApp.loop(JavelinApp.java:137)
javelin.JavelinApp.run(JavelinApp.java:112)
java.lang.Thread.run(Unknown Source)

Index: 0, Size: 0 (class java.lang.IndexOutOfBoundsException)
java.util.ArrayList.rangeCheck(Unknown Source)
java.util.ArrayList.get(Unknown Source)
javelin.controller.action.Charge.usedefaultattack(Charge.java:94)
javelin.controller.action.Charge.charge(Charge.java:61)
javelin.controller.action.Charge.getoutcomes(Charge.java:164)
javelin.controller.ai.ActionProvider.next(ActionProvider.java:87)
javelin.controller.ai.ActionProvider.next(ActionProvider.java:96)
javelin.controller.ai.ActionProvider.next(ActionProvider.java:96)
javelin.controller.ai.ActionProvider.next(ActionProvider.java:1)
javelin.controller.ai.valueselector.ValueSelector.getValue(ValueSelector.java:89)
javelin.controller.ai.AlphaBetaSearch.alphaBetaSearch(AlphaBetaSearch.java:78)
javelin.controller.ai.AiThread.run(AiThread.java:45)

Auto-attack

auto-attack: player-only action, attacs weakest target in range (cr*hp/maxhp) - will be pretty useful with reach

Add an "autoattack" feature

Doesn't need to be smart, just easy to access to quickly finish and accelerate fights. Something like using the TAB key would be great.

Show initiative order

For now this could be a button to press and show the order, but on 2.0 probably it would be better to have a window that the player can leave open if he wants to.

Refund transport available even without transport

Using the refund without transport crash the game:

null (class java.lang.NullPointerException) javelin.view.screen.town.TransportScreen.select(TransportScreen.java:63) javelin.view.screen.town.SelectScreen.select(SelectScreen.java:126) javelin.view.screen.town.SelectScreen.processinput(SelectScreen.java:108) javelin.view.screen.town.SelectScreen.show(SelectScreen.java:67) javelin.view.screen.town.TownScreen.select(TownScreen.java:58) javelin.view.screen.town.SelectScreen.select(SelectScreen.java:126) javelin.view.screen.town.SelectScreen.processinput(SelectScreen.java:108) javelin.view.screen.town.SelectScreen.show(SelectScreen.java:67) javelin.view.screen.town.SelectScreen.show(SelectScreen.java:69) javelin.view.screen.town.SelectScreen.show(SelectScreen.java:69) javelin.view.screen.town.TownScreen.<init>(TownScreen.java:47) javelin.model.world.location.town.Town.interact(Town.java:396) javelin.view.screen.WorldScreen.react(WorldScreen.java:415) javelin.controller.action.world.WorldMove.perform(WorldMove.java:103) javelin.view.screen.WorldScreen.convertEventToAction(WorldScreen.java:160) javelin.view.screen.WorldScreen.humanTurn(WorldScreen.java:132) javelin.view.screen.BattleScreen.step(BattleScreen.java:181) javelin.view.screen.WorldScreen.step(WorldScreen.java:222) javelin.JavelinApp.loop(JavelinApp.java:128) javelin.JavelinApp.run(JavelinApp.java:112) java.lang.Thread.run(Unknown Source)

Crash during combat: couldn't determine outcome

Here's the log:

Couldn't determine outcome: 0.83038557 (class java.lang.RuntimeException)
javelin.controller.action.Action.outcome(Action.java:141)
javelin.view.screen.BattleScreen.computerTurn(BattleScreen.java:350)
javelin.view.screen.BattleScreen.humanTurn(BattleScreen.java:220)
javelin.view.screen.BattleScreen.step(BattleScreen.java:181)
javelin.view.screen.BattleScreen.mainLoop(BattleScreen.java:166)
javelin.controller.exception.battle.StartBattle.battle(StartBattle.java:65)
javelin.JavelinApp.loop(JavelinApp.java:137)
javelin.JavelinApp.run(JavelinApp.java:112)
java.lang.Thread.run(Unknown Source)

Was running with:

ai.maxsecondsthinking=0.1
ai.maxthreads=1
ai.cache=false
ui.messagedelay=0.75

Improve preferences window

Create a dynamically-generated window that reads from and writes to preferences.properties .

Add key binding to preferences.properties. This is necessary due to many keyboards not having numpads and different keyboard layouts making it impossible to have a specific solution (like vi keys) that will work for everyone.

Moons

1/30 chance per day

Week#current object
Week#endsat (current day +5)
NormalWeek = used most of the time

wild moon -> doubles random overworld encounter chance
tranquil moon -> halves random overworld encounter chance
blue moon -> halves town labor production
bearing moon -> non-stop dwelling production
enchanted moon -> spontaneously restores spells once per day (1 per caster)
eclipsing moon -> forces perpetual night conditions
gilded moon -> doubles gold for random overworld encounters
meager moon -> halves gold for random overworld encounters

Unit personality

Proper dying / stabilization

have a proper dying phase (up to -10HP) during combat for allied units. after combat they can be revived to 0HP for simplicity's sake. of course would have to implement the Heal rules and such but it should be straightforward if it's only human-side.

have a 3x3 overlay for dying

might need to change the combatant.status() from dying to critical or a synonym

Certain upgrades can't be trained

Some upgrades can't be trained to certain units in some games or after certain upgrades are acquired.

ex game 1:

Train ability (intelligence) cannot be trained to: orc, half-orc, hill dwarf (starting units).
Train ability (intelligence) cannot be trained to: young black dragon, small earth elemental (drafted units).
Train ability (intelligence) CAN be trained to: azer, small earth elemental (drafted units).

The above stay the same in different towns.
Other stats are always available (constitution).

ex game 2:

Train ability (intelligence) CAN be trained to: orc, half-orc, hill dwarf (starting units).
Train ability (intelligence) cannot be trained anymore after these units upgrade aristocrat.

Here's the save for game 1, on the last version at this date:
javelin.zip

Change extension to .rar

Better AI movement

With the AI feedback, should be able now to walk up and close to a unit in a single move, instead of step-by-step - as long as the target is in sight. This is not intended to replace normal movement.

java.lang.NoSuchMethodError when starting game

basti ~/Downloads/javelin $  java -jar javelin.jar 
Exception in thread "main" java.lang.NoSuchMethodError: java.lang.Class.getTypeName()Ljava/lang/String;
    at javelin.controller.challenge.factor.quality.QualitiesFactor.calculate(QualitiesFactor.java:22)
    at javelin.controller.challenge.ChallengeRatingCalculator.calculaterawcr(ChallengeRatingCalculator.java:109)
    at javelin.controller.challenge.ChallengeRatingCalculator.calculateCr(ChallengeRatingCalculator.java:83)
    at javelin.controller.db.reader.MonsterReader.registermonster(MonsterReader.java:512)
    at javelin.controller.db.reader.MonsterReader.endElement(MonsterReader.java:489)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:609)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1783)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2970)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:118)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
    at javelin.Javelin.<clinit>(Javelin.java:99)
basti ~/Downloads/javelin $  java -version
java version "1.7.0_99"
OpenJDK Runtime Environment (IcedTea 2.6.5) (Arch Linux build 7.u99_2.6.5-1-x86_64)
OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode)
basti ~/Downloads/javelin $  uname -a
Linux archlinux 4.5.1-1-ARCH #1 SMP PREEMPT Thu Apr 14 19:19:32 CEST 2016 x86_64 GNU/Linux

City events

City events that should happen inside a District instead of the normal wilderness hazards. Mostly use social skills to play out. (only on friendly towns)
# guards confuse you for suspects in a crime and put you into prion for one day (diplomacy DC25 reduces time accordingly)
# riot (removes 25-diplomacy check labor from the town, never happens in religious towns)
# fire (one of the district's locations needs 5/10/15 labor before resuming activities, becomes a construction site, never occurs during rain)
# collective effort (if they decide to spend a day working with the town each character may produce 1 labor per successs level of DC15/20/25 through a Constitution roll)
# flood: during a storm if city or bigger a flood may give out poison damage to those caught in it
# food shortage: size-- (winter only)
# immigration: size++ (spring only?)
# street gang - at night only, party may be attacked by a mob of thugs. only if city >= city. thugs are low level but come in big sizes. they will only attack if the fight is moderate or difficult. Guards may come to help too.

Haunts

Can probably think of a better name, not be confused with Pathfinder haunts.
would be cool to have some thematic dungeons (acting like temples, or simple fights)
All monsters inside are affected by a template or of a certain type
all encounters are of a fixed level
once you destroy the boss (harder encounter), the dungeon is removed
hard fights that reward you with an extra ruby?
all are static difficulty
to form garrison: just pick eligible creatures at random until target EL is reached
would be cool to have custom maps too and stuff like multiple waves, etc

Crash if cart goes above 100% load

Buy cart -> draft creatures until above 100% load -> exit town -> crash

[Ljava.lang.Object; cannot be cast to [Ljavelin.model.unit.Combatant; (class java.lang.ClassCastException)
javelin.model.unit.transport.Transport.getspeed(Transport.java:72)
javelin.model.unit.Squad.speed(Squad.java:542)
javelin.view.screen.WorldScreen.updateplayerinformation(WorldScreen.java:277)
javelin.view.screen.WorldScreen.step(WorldScreen.java:216)
javelin.JavelinApp.loop(JavelinApp.java:127)
javelin.JavelinApp.run(JavelinApp.java:112)
java.lang.Thread.run(Unknown Source)

Show attack and damage rolls

Requested via e-mail.

Would you mind putting the results of rolls down in the console or at least attack and damage rolls?

Unfortunately this is not as easy as it sounds. The artificial intelligence doesn't roll dices (d20) as we think about them as players. Instead it calculates percentages for every possible outcome - for example, 50% of missing an attack, 25% chance of hitting and causing 1 damage and 25% of causing 2 damage. Real scenarios are a lot more complicated than that simple example.

Showing damage would be easier but since damage can be dealt in many ways this would mean changing every single damage dealing spell, and every combat maneuver. It's a lot of work plus the AI side to everything so I won't be making it a priority. If you think it's really important let me know and I'll reconsider dong it sooner. Also one of the ideas of Javelin was to hide as many numbers as possible so it can be more immersive and less rule-oriented but I can understand that hardcore gamers would like to see the actual rolls/damage made.

In the future it should be possible to turn on an option that would show at least player (human) rolls for normal attack and damage. Spells and other sources of damage that operate independently could then be modified slowly to work with that option.

Military district

Guardhouse/stronghold/fortress/citadel (5/10/15/20, requires hamlet/village/town/city): automatically kills an incursion in the distrcit up to the converted labor->level->EL, self destructs afterward.

Deep dungeon

    20-level dungeon (el1-20), each entry is a different fight

Game Does Not Start

I just recently downloaded V1.1 and I start it, but only see a black screen. The menu shows the game title "Javelin", but the content of the program is just a black screen.

This is the output from java:

java.io.FileNotFoundException: monsters.xml (No such file or directory)
    at java.io.FileInputStream.open0(Native Method)
    at java.io.FileInputStream.open(FileInputStream.java:195)
    at java.io.FileInputStream.<init>(FileInputStream.java:138)
    at java.io.FileInputStream.<init>(FileInputStream.java:93)
    at java.io.FileReader.<init>(FileReader.java:58)
    at javelin.Javelin.<clinit>(Javelin.java:94)
Exception in thread "Thread-3" java.lang.RuntimeException: java.io.FileNotFoundException: README.txt (No such file or directory)
    at javelin.JavelinApp.initialize(JavelinApp.java:122)
    at javelin.JavelinApp.run(JavelinApp.java:72)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.FileNotFoundException: README.txt (No such file or directory)
    at java.io.FileInputStream.open0(Native Method)
    at java.io.FileInputStream.open(FileInputStream.java:195)
    at java.io.FileInputStream.<init>(FileInputStream.java:138)
    at java.io.FileReader.<init>(FileReader.java:72)
    at javelin.JavelinApp.initialize(JavelinApp.java:113)
    ... 2 more

It seems that certain files are not found.

Rubies

since rubies are becoming just another currency convert them into a stackable item

District

Base: Inn (completed? remove Accomodation), growth, redraw

Missing: stables++, shop, academy

#31

Monsters with reach

Lower-level monsters are usually a better option to work on since they can also be used at higher levels when combined into groups (larger numbers of a single creature or mixed groups as well). Also, if a player dies early and has to restart his game, having a large variety of weak monsters helps the first hour or so of the game not feel too repetitive.

However, high-level monsters are also useful since there are less of them currently featured in the game - thus, adding even a single high-level monster can go a long way in making the late game more interesting.

Suggestions
These are hand-selected because they are easier to add to the game right now (once images are provided) and also would have the bigger impact in gameplay (such as being featured in multiple terrain types, making them more common in the game). Links show a helpful image for reference but artists are encouraged to be as creative as they want :)

  1. Large skeleton (CR 1)
  2. Large zombie (CR 1)
  3. Ogre (CR 2)
  4. Deinonychus (CR 3)
  5. Troll (CR 5)
  6. Choker (CR 2)
  7. Violet fungus (CR 3)
  8. Minotaur (CR 4)
  9. Otyugh (CR 4)

Low level (CR 0-5)

  1. Assassin vine (CR 3)
  2. Ettin (CR 5)
  3. Girallon (CR 5)
  4. Dire ape (CR 3)
  5. Large air elemental (CR 5)
  6. Large earth elemental (CR 5)
  7. Large fire elemental (CR 5)
  8. Large water elemental (CR 5)
  9. Djinni (CR 5)
  10. Sea hag (CR 4) seahag (by Pizza Frank!)
  11. Merrow (aquatic ogre, CR 3)
  12. Scrag (CR 5)

Middle level (CR 6-10)

  1. Achaierai
  2. Belker
  3. Gray render
  4. Invisible stalker
  5. Lillend
  6. Shield guardian
  7. Giant octopus
  8. Vrock
  9. Osyluth (baatezu)
  10. Kyton
  11. Efreeti
  12. Noble djinn
  13. Hill giant
  14. Stone giant
  15. Stone giant elder
  16. Frost giant
  17. Fire giant
  18. Flesh (golem)
  19. Clay (golem)
  20. Annis
  21. Ogre mage
  22. Noble salamander

High level (CR 11-15) (some of these would be also welcome, see #116)

  1. Devourer
  2. Roper
  3. Hezrou (10x10 unfortunately)
  4. Stone (golem, 10x10 unfortunately)
  5. Iron (golem, 10x10 unfortunately)

Very high level (CR 16-20)

  1. Planetar
  2. Solar
  3. Marilith
  4. Balor
  5. Pit fiend (baatezu, 10x10 unfortunately)

A note on 10x10 monsters: 5x5 means that a monster fits in 1 tile, like all units in javelin at the moment (5 feet by 5 feet space). 10x10 means they occupied 4 tiles (2 wide, 2 long) and that isn't supported by the engine at the moment, being a long-term goal. These images should be larger (64x64 for example, for 10x10 monsters) but aren't likely to be used any time soon.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.