Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - 3man75

Pages: 1 2 [3] 4 5 ... 334
31
General Discussion / Re: if self.isCoder(): post() #Programming Thread
« on: August 18, 2016, 07:29:57 pm »
Desktop but more of a school based project thing (not that i'm currently a student). 

32
General Discussion / Re: if self.isCoder(): post() #Programming Thread
« on: August 18, 2016, 05:20:07 pm »
Hi guys. I finished my dice roller project and decided to tackle a bigger one that ended in great failure just now...A program that could create an entire chapter of space marines via a 'process' of human to implant to chance of failure to space marine. I won't go much more into it because it was just too much.

I just tried a human project (same day) and it caught fire when my IDE eclipse went wacky. I'm starting to learn a few things:

1. I don't know jack about IDE's.
2. I can't seem to be able to read manuals on this online. An YT videos of this are getting really boring.

In short I don't know if I have what it takes to one day make video games and write code. The idea about creating I like but the learning curve is massive and I don't know where to start. I just missed a semester so I have time to just relax and think but I don't know what I should do.

Anyone have this problem? If so, how did you overcome this feeling of smallness. It just feels like the more I learn the more I delve into things the smaller I get and the less I know. I'm also finding that I start things easily (like anyone..) and then burn out when I finish just one or two articles or just can't remember a certain piece of synthax.

((By the way if this isn't the place for these questions I'll just delete it and post somewhere else. Reading the OP 'problems' looked like this could fit here.))

33
The faction you're referring to is the son of bitches, or SOB. They're part of the church, wear power armor, wield chainswords and bolters, and freakin magic, and will rek ur face.
The Sisters of Battle do not use magic. They are very much a "burn the witch" organisation.

To me the Sisters are kind of like a Holy Paladin (If they have power) where they use holy Emperor essence and prayer to fight. Or if their just normal nuns in power armor and firing bolters.

34
I'm asking because i'm trying to make a program on Java with the ability to successfully implant a percentage. But I don't know which percentage that would be..

35
So question..

When it comes to Primarch gene seed which ones are easiest to successfully implant? As in, which ones will usually actually produce a neophyte?

I'm speaking of ALL of the primarchs also btw. I found on the lexicanum a mutational chart but that's not exactly what I am looking for.

36
Life Advice / Re: The Generic Computer Advice Thread
« on: July 27, 2016, 01:17:39 pm »
Hi bay watchers.

I'm looking at an issue with Rufus ((https://rufus.akeo.ie/)) which is a program that helps create bootable USB drives. We use them to get PC's on ghost which then allows us to re-image a computer.((https://www.symantec.com/theme/ghost)).

My boss asked me to do a like 17 of these in order to get ready for a mass re-imaging project at our workplace. Problem is that they don't conect to ghost servers..

More specifically, when I hit unicast on them to log onto a ghost session the computer attempts to find the session but isn't receiving any data. Were trying to push a windows 10 image onto it btw and I was using NTFS file system. Would a FAT file system work better?

37
General Discussion / Re: Mathematics Help Thread
« on: July 26, 2016, 09:03:58 pm »
Hi guys I need help calculating my grades to give me an idea of what I should do in my upcoming final.

My grade is broken down currently to be 30% H.W and 50% tests (total possible grade) initially. Then my professor says that this is false and that they should both be 40% each and it will be changed...when he gets around to it.

I have 28.86 out of 30 points for h.w and 34.56 points out of 50 points in my tests. After the weight changes are done what will be my new total?

Average scores are 96.19% for H.W and 69.1% Tests.

63.41 points out of 80 points.

Basically, as minor as it might be I'm trying to have at least 75% of the total grade because of how the class is setup. I think he may be curbing the grades but i'm not sure if he is or by how much (He goes back and forth from being hardass to 'I'm old and I don't care. Just pass').

How do I convert these scores?

38
General Discussion / How to make a Rufus?
« on: July 14, 2016, 04:46:57 pm »
Hey all.

My boss wants me to create a Rufus and has a specific ISO but whenever I implant it into Rufus with his orders it fails to work.

I'm using all default and making it so that it can boot from USB and UEFI. No extra runs and everything is just default.

I want to say that I should switch over from FAT to NTFS but my boss told me not to keep on trying even though I know he'll be mad if I don't complete this by this weekend.

Any ideas or suggestions?

39
@3man75:I have no clue why it's...Oh!  When you close a looping statement, all the variables declared in it go away.  So your Scanner is already dead, and honestly you probably don't need to close it anyway.

Code: [Select]
import java.util.Scanner;

public class MainMenu {

public static void main(String[] args) {
[b]do {[/b]
System.out.println("Welcome to dice roller. Please input the number of the dice you want to roll. For example: 6 for a 6 sided dice or 50 for a 50 sided dice.");
Scanner howManySides = new Scanner (System.in);

int sidesOfADice = howManySides.nextInt();

ObjectDice gameDice = new ObjectDice (sidesOfADice); //One argument calling constructor.

sidesOfADice = howManySides.nextInt();//reusing scanner. sidesOfADice is a int holder for the scanner.

gameDice.rollMulti(sidesOfADice);


} while (sidesOfADice != 0);
howManySides.close();
}
}

Should I move the "do {" part above to not encompass the scanner?

40
@3man75:What does your code look like now?

Spoiler (click to show/hide)

It was basically done. If you ignore the do while that I set up it would take in ANY dice you would want to throw and would throw as MANY as you wanted! But then I noticed..what if someone wasn't done? What if they wanted to throw more dice? Easy set up a loop but for some reason my scanner sidesOfADice won't 'resolve to a variable'. In other words, a black error.

Everything else works now though..

Rest of the code here:
Spoiler (click to show/hide)

Also god damn do I feel like small fry around you guys. Building servers? I have to up my game..

But yeah mostly done. Once I figure this out i'm planning on setting up the gui. Thankfully I have a Java book with an entire chapter devoted to it. Yay for books!

EDIT: Anyone know how to make the code blocks bigger?

EDIT 2: Okay. Fixed so that now the code can be looked at without copying to a notebook or squinting.

41
@Mephisto:No he does not.nevermind

Also, 3man75, good grief, you NEVER need to import Object.

I want to help with this, but I'd end up completely rewriting your code and not really helping.

Also, you really, really, really need to learn more about how to write readable variable names...AND STOP MAKING MULTIPLE SCANNERS POINTED AT SYSTEM.IN FOR LIKE THE TENTH OR SO TIME AAAUGH.  Sorry.  I shouldn't shout.  But you only need the one Scanner, let's call it input, and then you can call input.nextInt() multiple times.

...Also, screaming about THIS METHOD IS BEING CALLED BY MAIN! is...Not a guaranteed truth, in addition to being really weird documentation-wise, because the line of code you wrote ISN'T being called in main, it's being called in your method.  One's code should not depend on being called by certain other code unless it's a private method, which I will not talk about because that's outside your current scope.

...Sod it, I'm going to write an unconnected example in the hopes that it actually gets through.

Code: [Select]
import java.util.Scanner;
public class Demo{
Scanner scan = new Scanner(System.in); //And notice how there is ONE Scanner, not two or three.
public static void main(String[] args){
//I'll avoid complicating things and just write it to go through each method once, though simply wrapping this with a while loop and implementing some sort of menu shouldn't be hard.
System.out.println("Input the initial value for instancevariable");
DemoObject whatdoesitdo = new DemoObject(scan.nextInt()); //Much less code to write than creating a new variable to store a value you only use once.

//Now, to demonstrate proper object-based I/O.

System.out.println("Called singleUseThing and got "+whatdoesitdo.singleUseThing()); //This is what a return statement is for.  It hands data back to the method that called things.
System.out.println("How many times would you like to call multiUseThing?");
int[] output; //Have to declare this outside of the loop so it doesn't vanish after the first iteration.
for(int count = 0, int max = scan.nextInt() /*Reusing a Scanner, see?  Also, you can do this comma thing here.*/, output = whatdoesitdo.multiUseThing(max); count<max; count++){
System.out.println("Result "+(count+1)+" of multiUseThing was "+output[count]);
}
}
}

public class DemoObject{
int instancevariable;
Random RNGesus = new Random();
DemoObject(int setup_value){
instancevariable=setup_value;
}

public void setInstanceVariable(int to_set){
instancevariable = to_set;
}

public int singleUseThing(){
return RNGesus.nextInt()*instancevariable;
}

public int[] multiUseThing(int num_times){
int[] temp_storage = new int[num_times];
for(int count = 0; count<num_times; count++){
temp_storage[count] = RNGesus.nextInt()*instancevariable;
}
return temp_storage; //Handing the array back for whatever.  If you only wanted to print odd-numbered results, you could do that without mucking up the object for uses that need all the results printed.
}

I apologize for the tabs, but it was much faster than spaces, especially because I typed this on my phone

Got it done just now and I killed off one of my scanners. An as for variable names..well that'll come later, as of now as the time of this writing.


42
Spoiler (click to show/hide)

Hey guys, I have some trouble getting my program to roll multiple dice. I've tried doing a loop on main to contiunisly call a function to no avail. Then I thought "Why not ask a certain part of another class to roll for me when called.".

In this program when you ask to have a 100 sided dice for say, it'll transfer an int of 100 to the class and make an object. Then return said object.

I then attempt to get that object which I call 'First' and then ask First to access his special class that lets him roll a certain number of times. For some reason the first number inputted is consumed and the second number lost. Code is above.

Am I forgettig some rule for synthax here or is their something fundaentally wront with what i'm doing? I always thought it was Blueprint nameofobject = new Blueprint(arguments if needed);

then using

nameofobject.certainAbility(arguments if needed);

So yeah let me know if anyone has any ideas on what's going on and point me to the road to fix it. After this i'm basically done and i can get started on GUI. Then maybe put in an appstore to make billions (sarcastic joke).

But ya i'm thinking about putting it in an appstore to help shore up my resume.



43
Good use with the prints for debugging, you get a much better idea of the order that bits of code are being called.

Here's what I like to do: have the debug print at the start of a function print out it's name and parameters. Include the class name as well for the most detail. e.g. for your dice constructor, instead of "hello", try printing:

System.out.println("Dice.Dice("+x+")");

Debug printing of the name of functions and what values they are getting can really save time when you know some bit of code is screwing up, but you're not sure where the problem is. I've had countless times that I've debugged some "faulty" bit of code over and over, only to do a debug and realize that another bit of code was sending it the wrong values. The first thing you should always double-check is what values a function is receiving.

Is that a feature in eclipse? I think i've seen it but never got around to actually using it. I'll definetly take a look at it tommorow after class.


44
Spoiler (click to show/hide)

Hey guys just wanted to show my progress in this project. I've been off the PC do some things but I finially re-made this using OOP.

45
Since what I posted was a bit hard to follow I'll post it again. I am using an IDE, Eclipse (Mars) by the way. It's just that like I said that my laptop was open and on while I typed away at the forum via another pc. My wifi in the house dosen't work so I coudn't use my laptop to post on the forum.

Spoiler (click to show/hide)

Working on fixing a few things still for the OOP version. Thanks @Reelya for the help.

Also you may notice that this code dosen't run and that's because I fiddled with it after it was working to try and get multiple dice to work on it. As I have said before, no dice. Pun intended ;)

EDIT:

Having a hard time visualizing what I need to do. This is a guess but..

1. Public Class Dice.

2. Make traits for Class Dice. Such as int sides.

3. Make a function that 'gets' sides. You know like getSides.

4. Another function transfer whatever getSides is (It will be int something) and put it in a roll function.
       - random
       - random(getSides) + 1;

This seems like a good track from guess work. Btw I was looking at Reelya's suggestion and formulating as I type. This still leaves me with two questions though: 1. How to make multiple rolls and 2. the actual coding.

I know I can't be helped with the last one, that's what my 80$ book is for, but how can I get it to roll more than once? Can I make another function that does that seprately?

something like...

class DiceXXXXX

while (userwanted to roll){

random(getSides)+ 1;
}

Not sure if that'll work since I tried it before...Either still working on all of this.

Pages: 1 2 [3] 4 5 ... 334