Nightgames Mod (v2.5.1.2) updated 2/11/17

The Silver Bard

Well-Known Member
Sep 2, 2015
207
23
De Morgan's laws are important for evaluating some of the boolean expressions. Remember:
!( A || B) == !A && !B
!( A && B ) == !A || !B
 

DarkSinfulMage

Well-Known Member
Nov 18, 2016
253
44
42
This could be solved if we simply used more meaningful names. There's nothing I can't stand more than a bunch of nonsense that doesn't have associated documentation. There's no need for small symbols - especially when you're not working by yourself. Many methods in the code currently do not have standardized, recognizable, and meaningful names.

is, has, or can - followed by something for returning booleans, for example.

isFuckingMyAss()

hasAPartToFuckWith()

and so on. This also helps navigate classes as a whole, particularly in any IDE.
 

The Silver Bard

Well-Known Member
Sep 2, 2015
207
23
To be fair, most of those methods date back to when I was the only person who was ever going to be touching the source code, and the entire game was only a few thousand lines long.
Maintaining the code was much simpler back then.
 

Ryplinn

Well-Known Member
Jun 13, 2016
62
14
Be gentle with code criticism, y'all. While it is true that You Are Not Your Code™, there's no need to make anyone have to remember that. The Bard didn't have to allow access to the source (thank you!).

More descriptive names are a good idea, but they're not critical. They're the sort of thing that can be updated as we go, or worked around with comments and IDE features. Plus, what constitutes a good name varies from person to person (although DarkSinfulMage's suggestions are a good starting point).

In addition to making names more helpful, any time you find a complicated expression, it's worth writing a comment in plain English describing the intent (whether authorial or inferred), so that those who come after can verify if the current expression is fit for purpose. The explanations in the posts above are good examples of these sorts of code comments.
 

DarkSinfulMage

Well-Known Member
Nov 18, 2016
253
44
42
Just for clarity - Not insulting anyone here. I'm no saint, myself. I DO think we could use a few methods that break down and simplify obtaining information about a character's state or the state of a given thing in the game - and making it intuitive to find such a method through use of convention.
 

Ryplinn

Well-Known Member
Jun 13, 2016
62
14
I DO think we could use a few methods that break down and simplify obtaining information about a character's state or the state of a given thing in the game - and making it intuitive to find such a method through use of convention.
That would be nice. It may be worth thinking about the gamestate as a database we issue queries against, and designing an API around that (or embedding SQLite or something), since we look at so many sets of variables in different ways.
 

DarkSinfulMage

Well-Known Member
Nov 18, 2016
253
44
42
That would be nice. It may be worth thinking about the gamestate as a database we issue queries against, and designing an API around that (or embedding SQLite or something), since we look at so many sets of variables in different ways.

Well, what I think would help first is if every relevant ADT had the same things. No need for a database as long as an amateur can reasonably hit "." and do, get, set, is, has and so on show them the way to deeper access.

m_Name - If a character, token, Addiction effect or other thing owned or created by a player and attached to another, this should be the easiest thing to find it by when searching a data structure. getm_Name() would be known and recognizable.

that way, you can do getCharacterByName(String name), getTokenByName(String token), hasTrait(String name), getRelationshipByName(String name), and even getAddictionByCause(String effectName, String causer). (Most of these at the Character level of things, ofc.)

(of course, beware of string equality comparison.)

It's not really straightforward to get a particular character from the data, or to get a specific something from a specific character in the data someplace in any given class. Being able to access and get them by a name can help us make new stuff in the future.
 

The Silver Bard

Well-Known Member
Sep 2, 2015
207
23
There is a static Global.getNPC(String name) and static Global.getNPCByType(String type), depending on whether you want to search by character name or class name (which are usually the same).
 

DarkSinfulMage

Well-Known Member
Nov 18, 2016
253
44
42
Yup! Do stuff like that in Character and you can access things all the way down from anywhere.

IN other news. I started playing with level 200 stuff for laughs and gave myself 10000 willpower. Last Stand+Carnal Virtuoso makes fighting Angel absolutely hilarious by the time she's doing millions in damage back to you several times in a row. XD
 

Rob Clark

New Member
Mar 21, 2018
2
0
53
I'm a big fan of the game and all of the work done in the mod. I'm curious if there is a plan for a new stable or release candidate. I'm on a Linux box and I'm not sure how to get the latest playable version of the game. Again, I'm grateful for all of your work.
 

witchlook

Member
Mar 4, 2017
12
4
45
Hey there, checking back in. Glad to see the overhaul is coming along off and on. I'd like to help the project get to a more stable state and thought I'd reach out to ask how my time is best spent. I can design, write, and code, but my time is sporadic so I don't want to lay claim to any huge blockers. Ideas:
  1. Game design
    1. Are any systems in need of work or an overhaul (eg time)?
    2. Work on bringing the varied skills & attributes under the same balancing philosophy. This would help us answer questions like: what new gameplay does Attribute X offer? What makes skill X unique and why does it exist? How should attributes scale?
  2. Software engineering
    1. I could help with Ryplinn's overhaul if we can figure out something for me to work on that wouldn't step on any toes. I would love to get this wrapped up because I think it will enable the community to work on various stuff without worrying about wasting their time.
    2. Any misc code health issues people may have identified
    3. More & better testing
  3. Content creation
    1. Lots of content assumes gender. "Genderizing" the game is a huge project but I could hack away at it slowly.

Let me know if any of these sound reasonable or if there's something else that desperately needs doing.
 

DarkSinfulMage

Well-Known Member
Nov 18, 2016
253
44
42
@witchlook

I would say get with Ryplinn about tasks involved with the overhaul. They have their own project sub-tasks and stuff set up on their github. I'd leave content creation to just a word document or something - it's too early to implement content without understanding what we end up with and how it should be done. We might even have the means to implement new kinds of content.

Genderizing the game should probably be centered around the classes and methods that are currently working with pronouns and different words. It's a very complex situation that isn't very usable from an "implementing content" perspective.

Of course, documenting that so people can easily accommodate different body parts/gender/etc would be helpful.

I too want this to get done, but it's one of the hardest and most trying and expansive things to do - overhauling a game. If you are up for taking on subtasks, that's great, but it'll mean constant and close communication.

@Rob Clark
I'm not even sure how we're gonna work that out. We're contributing to something a bit decentralized, at this point. I'm supposing that, considering the depth and breadth of the overhaul we may consider a brand new fork to release on?
 
  • Like
Reactions: Rob Clark

witchlook

Member
Mar 4, 2017
12
4
45
Thanks for the response. I'll work on the overhaul for now, attempting to follow @Ryplinn's roadmap (let me know if there's something in particular that needs work). The next item is making the daytime loop explicit, and I can use previous work on the main and match loops as reference. This appears straightforward, but we immediately discover that Daytime events are broken. Currently when one triggers the game ends up kicked back to the main loop and blocked by the readyForNight latch. I'd like to use the opportunity to rewrite Daytime events- the current infrastructure is a little wonky. Since the system is fairly isolated and there's only one event it shouldn't have many side effects.

Sound good? Any features you'd like out of the rewrite?
 
  • Like
Reactions: Ryplinn

Rob Clark

New Member
Mar 21, 2018
2
0
53
@Rob Clark
I'm not even sure how we're gonna work that out. We're contributing to something a bit decentralized, at this point. I'm supposing that, considering the depth and breadth of the overhaul we may consider a brand new fork to release on?

Wish I could be of some help, but my programming/release management skills are about 10 years out of practice. I enjoy following the progress of the game in this thread, and it's exciting to see all the new ideas and progress. I'm grateful for all the work that has been done in this mod.
 

Ryplinn

Well-Known Member
Jun 13, 2016
62
14
I've pushed a few fixes I had, and the start of my work on the Daytime stuff. I don't foresee myself having the brainpower to work on the rewrite any time soon, so continue with my blessing. None of my toes will be stepped on right now.
 

DarkSinfulMage

Well-Known Member
Nov 18, 2016
253
44
42
A few things I would personally get back to doing once we get on the other side of this:
1. If traits and other things haven't been done, I'd do them.
2. All the balance stuff I've posted about, including addictions.
3. Eve and Maya stuff.
4. Depending on some things, content scenes for characters - new scenarios depending on some conditions.
 

ThirdEyeKage

Member
May 24, 2018
6
0
44
Hey guys, been following this for a while. I just wanted to know, how do I give a created character the ability to cause addictions? Specifically, Zeal, and the things that are associated with it (Pray, Prostrate, etc.)
Thanks!
 

dndw

Well-Known Member
Aug 27, 2015
456
20
Hey guys, been following this for a while. I just wanted to know, how do I give a created character the ability to cause addictions? Specifically, Zeal, and the things that are associated with it (Pray, Prostrate, etc.)
Thanks!
Giving the character the 'zealinspiring' trait should do the trick. Either:
  • Add it to the character's .json file
  • Edit it into a save, or
  • Go to the debug screen (accessible from the credits window) and type '***.addTrait zealinspiring' where *** is the character's type (for custom characters, the type is NOT`necessarily the same as the name, it's in the .json). Then hit enter.
Addictions are a little wonky, though
 

ThirdEyeKage

Member
May 24, 2018
6
0
44
Giving the character the 'zealinspiring' trait should do the trick. Either:
  • Add it to the character's .json file
  • Edit it into a save, or
  • Go to the debug screen (accessible from the credits window) and type '***.addTrait zealinspiring' where *** is the character's type (for custom characters, the type is NOT`necessarily the same as the name, it's in the .json). Then hit enter.
Addictions are a little wonky, though

Thanks! Just one more question. Would there be a way to increase the frequency of a character using a move? I've looked in the .json files, and it might be weight, but I'm not sure.
 

lightningshifter

Well-Known Member
Aug 27, 2015
120
12
I was just curious about the rough state of the overhaul at this point. I realize there were a ton of game breaking issues in the last official release of the mod so I can understand the importance and need for a detailed overhaul. But without actually opening up those files in the github it is difficult for the casual player to actually get a feel for how close to a new stable build this is coming along. Honestly, I would just be happy to have the game working well enough that it wouldn't break all the buttons and stop moving forward during high level games. That's the main reason I quit playing it. I could play it fine in the low levels. But once you jumped up in the 100's you had to watch out because it could suddenly break at anytime during the battle and exploration part of the game.

Also, if there is a way to go about compiling the current branches into a build it would be kinda nifty if someone could at least leave directions on the github project site. I might try to do it because I've been curious about all the tweaks that I see being discussed in here. If it isn't practical to try to compile and play it in the casual player setting yet then I'll just wait until you folks decide it is ready for a new release again.

On a side note. I discovered that the one mod RC on page 79 I believe that's dated 24092017 seems to not want to launch at all. Of course it might be due to the fact that Java has recently released their new 10 series platform which is replacing platform 8. You have to go to their JAVA SE development page to get it though. The standard download pages only give the 8. Its funny though because the RC2 releases that were dated from back in april of 2017 seem to run fine with it. I dunno if it was a bad compile or if there was a tweak in it that the platform 10 doesn't want to let it launch. You double click or right click and say open. The icon flashes for like a fraction of a second and then nothing happens. I'll just try playing the RC2's which are newer versions than the last stable release at least.
 
Last edited:

DarkSinfulMage

Well-Known Member
Nov 18, 2016
253
44
42
I was just curious about the rough state of the overhaul at this point. I realize there were a ton of game breaking issues in the last official release of the mod so I can understand the importance and need for a detailed overhaul. But without actually opening up those files in the github it is difficult for the casual player to actually get a feel for how close to a new stable build this is coming along. Honestly, I would just be happy to have the game working well enough that it wouldn't break all the buttons and stop moving forward during high level games. That's the main reason I quit playing it. I could play it fine in the low levels. But once you jumped up in the 100's you had to watch out because it could suddenly break at anytime during the battle and exploration part of the game.

@Ryplinn 's branch is the one with overhaul tasks - I'd like to know what's up as well, since I've been hankering to play NGM again. I'd also like to get some hands-on with the current state of things and do not wish to mess around more with GIT.

Also, if there is a way to go about compiling the current branches into a build it would be kinda nifty if someone could at least leave directions on the github project site. I might try to do it because I've been curious about all the tweaks that I see being discussed in here. If it isn't practical to try to compile and play it in the casual player setting yet then I'll just wait until you folks decide it is ready for a new release again.

Requires knowing how to use GIT from Eclipse or your IDE of choice, but it's best when making your own fork to commit and pull from. Instructions are super buried in the thread, and I'm not really touching my branch because resolving conflicts is annoying and difficult when it's all spaghetti. I'm not good at GIT, but I managed to get working on things and the rest I'm trying to figure out myself.

On a side note. I discovered that the one mod RC on page 79 I believe that's dated 24092017 seems to not want to launch at all. Of course it might be due to the fact that Java has recently released their new 10 series platform which is replacing platform 8. You have to go to their JAVA SE development page to get it though. The standard download pages only give the 8. Its funny though because the RC2 releases that were dated from back in april of 2017 seem to run fine with it. I dunno if it was a bad compile or if there was a tweak in it that the platform 10 doesn't want to let it launch. You double click or right click and say open. The icon flashes for like a fraction of a second and then nothing happens. I'll just try playing the RC2's which are newer versions than the last stable release at least.

That's pretty concerning! I will update my JRE and see if I can compile it myself, and if not I will update my project and fork to use the new one and hopefully add whatever small changes I include. No overhaul or bugfixes, though, unless anyone wants to point out some fixes for me to merge in (CAREFULLY AND CLEARLY) or implement myself. If everything works, I'll make and upload a new private version JAR.
 

12centDime

Active Member
Mar 16, 2017
41
5
Random things:

NaturalGrowth and unnaturalGrowth don't work correctly. Changing line 803 in Global.java to

final int maxLevel = maxLevelTracker;

will make it work. It's worth noting that since the girls don't get as many wins as they should since one update or another, they lag behind in levels. Since no npc actually uses the naturalgrowth trait, you could simulate everyone getting levels by adding the trait to every character and setting the filter on line 807 and while on 808 to maxLevel - 1 or something. That way, they won't lag so far behind.
players.stream().filter(c -> c.has(Trait.naturalgrowth)).filter(c -> c.getLevel() < maxLevel - 1).forEach(c -> {
while (c.getLevel() < maxLevel - 1) {
c.ding(null);
}
});

Living Clothing Other doesn't work atm because the tentacleTop it creates takes up the bottom slot too for some reason. Can fix that by deleting the 'bottom' listing in data/clothing/defaults.json on line 1019
"displayName":"tentacle suit",
"buffs":[
],
"price":0,
"prefix":"",
"attributes":[
"skimpy",
"persistent",
"tentacleSuit"
],
"layer":0,
"slots" : ["top", "legs"],
"shops" : [],
"sex" : ["female"],
"hotness":0.5,
"name":"tentacletop",
"toughness":25,
"exposure":0.6

PartFucked.java breaks the game when a fight ends while a tentacle focus airi is still fucking someone with a tentacle. adding if (c != null) to the start of line 83 will fix it
public void onRemove(Combat c, Character other) {
if (c != null)
c.write(other, Global.format("{other:NAME-POSSESSIVE} slick %s slips out of {self:direct-object} with an audible pop.", affected, other, penetrator.describe(other)));
}

Collared.java doPostCompulsion has listings for PREVENT_ESCAPE, PREVENT_STRUGGLE, and PREVENT_REMOVE_BOMB, but doesn't list a cost for any of these. It's reasonable to assume these would be covered by case PUNISH_PAIN, since each is accompanied by a shock dealing damage while playing the game, but in no instance in which any of these are called is PUNISH_PAIN also called, so any of the shocks that prevent the player from taking an action are actually free for Mara, which seems unintended. Also, case PREVENT_REVERSAL does not exist amoung the listings. Suggest changing to
@Override
public void doPostCompulsion(Combat c, Situation sit) {
int cost;
switch (sit) {
case PREVENT_ESCAPE:
cost = 1;
break;
case PREVENT_STRUGGLE:
cost = 1;
break;
case PREVENT_REVERSAL:
cost = 1;
break;
case STANCE_FLIP:
cost = 2;
break;
case PREVENT_REMOVE_BOMB:
cost = 1;
break;
case PUNISH_PAIN:
cost = 1;
break;
default:
cost = 0;
}
charges = Math.max(0, charges - cost);
}

Beguiling Breasts doesn't care whether it's targets are actually looking at the breasts due to facing, or if the targets are blind-folded and can't see them at all. Bandaid fixing that with && getStance().facing(character, getOpponent(character)) && !getOpponent(character).is(Stsflag.blinded) on line 499 of combat.java does cause pets not to be tranced if the master is blinded or facing the wrong way though.
if (character.has(Trait.beguilingbreasts) && !getCombatantData(character).getBooleanFlag(beguilingbreastCompletedFlag) && character.outfit.slotOpen(ClothingSlot.top) && getStance().facing(character, getOpponent(character)) && !getOpponent(character).is(Stsflag.blinded)) {
 
  • Like
Reactions: DarkSinfulMage

DarkSinfulMage

Well-Known Member
Nov 18, 2016
253
44
42
Currently updating my JDK to 10 and will try to pull my own fork and compile it. This is more environment setup than programming, but I'm on it.

@12centDime - Thanks -> when I get things up and running again I'll throw those fixes in and see what happens. I figured there was a part with Airi that was causing that one. Thanks for spotting that.

EDIT: For whatever reason I've installed the JRE and JDK and still version 10 doesn't show up in Eclipse. This may take a while to solve. It's also broken my own projects. Damn...
 
Last edited:

DarkSinfulMage

Well-Known Member
Nov 18, 2016
253
44
42
Okay - Finally got it!
Eclipse had to be deleted and reinstalled. I tried a bit with IDEA and found that it was a matter of configuration. Eclipse non-updates strike again.
Now...let's see if I can pump out a new Jar with a few bugfixes...

EDIT: I'm taking the time to add a few very small things, just to satisfy myself and set up some fun things while we wait to implement everything all over. :D
 
Last edited:

DarkSinfulMage

Well-Known Member
Nov 18, 2016
253
44
42
Okay, now that my own stuff is working, I can try to continue working on non-overhaul stuff.

Here's a new Jar that works for me - drop it into a 2.6.0 Private Build folder and it should function.
Make sure you have Java installed, don't run it in the zip, etc etc.

https://mega.nz/#!ABpFAYSb!98yJjAAkC34u51xb53E-AjAe0N1ivtGEezm1kRp3DDg

For those interested, I've updated my fork and may throw up a few new changes of my own while bored.
https://github.com/DarkSinfulMage/nightgamesmod

If anyone wants to do me a favor - I'd like a debug button among challenge selection that forces the Leveldrain challenge. I've looked into doing this before and lost interest.
 

12centDime

Active Member
Mar 16, 2017
41
5
If I understand what you want, this is what I'd do. Heavily influenced by what I viewed as the coding convention and my own inexperience, so I won't say it's the best way or anything. Should allow the user to tick the debug option, then choose w/e challenge they want when the night starts regardless of requirements.

First we go into DebugFlags.java and add DEBUG_MATCHMODIFIERS to the list

Next jump to global.java add in import nightgames.debug.MatchModifierPicker, since we'll need that. next, at around line 868, rewrite the existing code to
public static void startNight() {
if (isDebugOn(DebugFlags.DEBUG_MATCHTYPES)) {
current = new MatchTypePicker();
current.respond("Start");
} else if (isDebugOn(DebugFlags.DEBUG_MATCHMODIFIERS)) {
current = new MatchModifierPicker();
current.respond("Start");
} else {
currentMatchType = decideMatchType();
currentMatchType.runPrematch();
}
}

Next, create MatchModifierPicker.java in nightgames.debug. We're basically copying MatchTypePicker with a few changes. Could also be done by editing this into MatchTypePicker.java if we'd rather
package nightgames.debug;

import java.awt.event.ActionEvent;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

import nightgames.global.Global;
import nightgames.global.Scene;
import nightgames.gui.KeyableButton;
import nightgames.match.MatchType;
import nightgames.modifier.Modifier;

public class MatchModifierPicker implements Scene {

@Override
public void respond(String response) {
Modifier[] modifiers = Global.getModifierPool()
.toArray(new Modifier[Global.getModifierPool().size()]);

if (response.equals("Start")) {
List<KeyableButton> buttons = Arrays.stream(modifiers)
.map(MMButton::new).collect(Collectors.toList());
Global.gui().prompt("<b>DEBUG_MATCHMODIFIERS is active. Select a match modifier below:</b>",
buttons);
}
}

private static class MMButton extends KeyableButton {

private static final long serialVersionUID = -3158804202952673759L;
private final Modifier type;

public MMButton(Modifier type) {
super(type.name());
this.type = type;
getButton().addActionListener(this::startMatch);
}

@Override
public String getText() {
return type.name();
}

private void startMatch(ActionEvent e) {
Global.currentMatchType = MatchType.NORMAL;
MatchType.NORMAL.runWith(type);

}
}
}

finish out by adding this right before the end of MatchType.java
//exists entirely to make debugging with MatchModifierPicker.java work. runs a default event
//with the given modifier while ignoring any requirements
public void runWith(Modifier m) {
Global.unflag(Flag.victory);
DefaultPrematch selection = new DefaultPrematch();
selection.type = m;
Global.current = selection;
selection.respond("Do");
}
------------------------------------------------
Notes:
DEBUG_MATCHTYPES takes precedence over DEBUG_MATCHMODIFIERS
This pulls from Global.modifierPool, so things like MayaModifier or anything need to be added to it if it's to be seen by the code. Didn't see a more complete list to pull from anywhere. LvlDrainModifier's already there though
 
  • Like
Reactions: DarkSinfulMage

DarkSinfulMage

Well-Known Member
Nov 18, 2016
253
44
42
I'll see if I can try that out today.

In the meantime. I had a few minutes so I started adding the skeleton to replace transformation placeholders on part modification screens. I have a thing for Angel and Reyka, so they're getting started, first.
 

DarkSinfulMage

Well-Known Member
Nov 18, 2016
253
44
42
New poll is up!

Should Airi (continue) Mimicing the special traits of the other characters?

https://strawpoll.com/zzdx2h14

Updates on my fork coming, including addition of that button I so dearly wanted (thanks @12centDime !) , expanded part sizes for cocks and pussies, and a lot of text changes and additions.
https://github.com/DarkSinfulMage/nightgamesmod

New Jar will happen when I feel like I'm done for a while. I'm doing lots of small changes and additions so no sense in making new exports.
 
Last edited: