Page 2 of 7
Re: Source Code and Ideas question
Posted: Sun Jan 19, 2014 10:36 am
by cim
Diziet Sma wrote:If you want 1.77.1 you'd have to pull "maintenance/1.77", which is the branch that will one day become 1.78, when the devs decide it has spent enough time in the bugfix finding/fixing zone.
maintenance/1.77
is the source as it was at release of 1.77.1
If you want the source that is eventually becoming 1.78 (with a few extra bugfixes) then that's the
maintenance/1.78
branch.
Re: Source Code and Ideas question
Posted: Sun Jan 19, 2014 12:45 pm
by Diziet Sma
@ another_commander.. thanks for the clarification.. I'm still getting the hang of this github stuff.
cim wrote:If you want the source that is eventually becoming 1.78 (with a few extra bugfixes) then that's the maintenance/1.78
branch.
Ok.. I must've somehow not noticed that one when I was looking the branches over.. thanks for the correction.
Re: Source Code and Ideas question
Posted: Mon Jan 20, 2014 8:38 am
by hangar18
another_commander wrote:You do not need a github account to download the source, unless you are one of the developers with commit rights. Many people without github accounts have built from source already, so we know that the instructions do work. hangar18, what is the actual message you are getting? Have you followed the instructions exactly as shown in the first post of the thread we linked you to?
Also, pull requests are not related to downloading the source for casual users, they are requests from people who have made changes to the code in their own external repositories, asking us to pull their changes in. Once you have pulled the entire repository, you can change to any of the existing branches using git checkout <branchname>
.
Yes I've followed the instructions exactly. This is the obstacle I cant overcome..after making a directory d/myoolite (all good), I changed directory with cd /d/myoolite (again all good), but then typed the following with the subsequent response
$ git clone
https://github.com/ooliteproject/oolite.git
cloning into 'oolite'....
Username for '
https://github.com/ooliteproject/oolite.git': <I input my GIT username>
Password for '
https://<username>@github.com': <I input my password>
remote: Repository not found
fatal: Repository '
https://github.com/ooliteproject/oolite.git' not found
Re: Source Code and Ideas question
Posted: Mon Jan 20, 2014 8:44 am
by JensAyton
There are capital letters in https://github.com/OoliteProject/oolite.git
Re: Source Code and Ideas question
Posted: Mon Jan 20, 2014 9:15 am
by hangar18
JensAyton wrote:There are capital letters in https://github.com/OoliteProject/oolite.git
Yes there are...I'm so stupid. Thank you...its all good now
Re: Source Code and Ideas question
Posted: Tue Jan 21, 2014 8:37 am
by hangar18
Well the good news is I've successfully managed to change the number and names of elite rankings from 9 to 15. The bad news is the initial git download was version 1.79 which has some instability issues. what I really want is the last stable release which is 1.77.1. I thought it would be a case of downloading the 1.77.1 source code directly from the web (instead of git clone using
https://github.com/OoliteProject/oolite.git ) , unzipping it in a directory and running the rest of the 4 stage code process by another_commander, but alas get a fatal error. Should I modify the git clone
https://github.com/OoliteProject/oolite.git in some way to pick up the 1.77.1 code?
Re: Source Code and Ideas question
Posted: Tue Jan 21, 2014 8:47 am
by another_commander
You already have the 1.77.1 code in your local repository. To access it, just go to the root folder of your oolite repository and do
git checkout 1.77.1
That's it. Your source tree will be instantly switched to the code for 1.77.1. You can then work on your changes there.
git checkout master
will bring you back to the bleeding edge.
Re: Source Code and Ideas question
Posted: Tue Jan 21, 2014 9:52 am
by another_commander
As this topic is effectively about how to build the source and not related to OXPs, it has been moved to Discussion.
Re: Source Code and Ideas question
Posted: Tue Jan 21, 2014 11:19 am
by hangar18
Many thanks...on another note, I've run out of ideas for renaming the elite classes and legal standings - some of these are pretty lame. Can anyone help generate new ideas. So far I have...
"Unknown",
"Rookie",
"Greenhorn",
"Trainee Cadet",
"Cadet",
"Experienced Cadet",
"Captain",
"Trainee Commander",
"Commander",
"Assassin",
"Competent Assassin",
"Dangerous",
"☆ Deadly ☆",
"★★★ E L I T E ★★★"
and for legal status
"Clean",
"Suspect",
"Offender (Minor)",
"Offender (Serial)",
"Offender (Wanted)",
"Fugitive (Marauder)",
"Fugitive (Pirate)",
"Fugitive (☆ Terrorist ☆)",
"★★★ Enemy of the galaxy ★★★"
Re: Source Code and Ideas question
Posted: Tue Jan 21, 2014 12:07 pm
by Disembodied
I think it would be a shame to throw away all but three of the original rankings: "Harmless" and "Mostly Harmless", especially, have something of a pedigree! You could keep them, and just fill them out a bit, e.g.:
Harmless
Mostly Harmless
Greenhorn
Poor
Rookie
Below Average
Average
Above Average
Competent
Capable
Dangerous
Deadly
Lethal
Elite
For the legal status, I'd suggest swapping "Fugitive (Marauder)" and "Fugitive (Pirate)": a "Pirate" sounds more generic to me (they might be a software pirate ...
), whereas a "Marauder" is definitely someone to be avoided.
Re: Source Code and Ideas question
Posted: Tue Jan 21, 2014 1:22 pm
by Pleb
I think my legal status in Oolite is already ★★★ Enemy of the galaxy ★★★
Re: Source Code and Ideas question
Posted: Tue Jan 21, 2014 2:06 pm
by Thargoid
So what does that make me?
Re: Source Code and Ideas question
Posted: Tue Jan 21, 2014 6:03 pm
by Pleb
Thargoid wrote:So what does that make me?
Galactic Enemy No.1?
Re: Source Code and Ideas question
Posted: Wed Jan 22, 2014 2:16 am
by Pleb
So I tried to have a go at this and I came up with:
Code: Select all
NSString *OODisplayRatingStringFromKillCount(unsigned kills)
{
NSArray *ratingNames = nil;
NSArray *ratingKills = nil;
unsigned i;
ratingNames = [[UNIVERSE descriptions] oo_arrayForKey:@"rating_names"];
ratingKills = [[UNIVERSE descriptions] oo_arrayForKey:@"rating_kills"];
for (i = 0; i < [ratingKills count] - 1; ++i)
{
if (kills < [ratingKills oo_unsignedIntAtIndex:i]) return [ratingNames oo_stringAtIndex:i];
}
return [ratingNames oo_stringAtIndex:[ratingKills count] - 1];
}
But unfortunately this didn't work...
Re: Source Code and Ideas question
Posted: Wed Jan 22, 2014 5:32 am
by Nyarlatothep
Exactly how didn't it work? Did the game crash to desktop?
You've got 2 independent arrays there, and by the look of it, there's no guarantee in the code that rating_names has got as many entries as rating_kills. If you try to get a string or a number from past the end of the array, any array, programs do tend to crash a lot.
I'd have:
Code: Select all
NSArray *ratingNames = nil;
NSArray *ratingKills = nil;
unsigned i;
unsigned shortestArray;
ratingNames = [[UNIVERSE descriptions] oo_arrayForKey:@"rating_names"];
ratingKills = [[UNIVERSE descriptions] oo_arrayForKey:@"rating_kills"];
shortestArray = [ratingKills count];
if ([ratingNames count] < shortestArray) shortestArray = [ratingNames count];
if (shortestArray > 0)
{
for (i = 0; i < shortestArray - 1; ++i)
{
if (kills < [ratingKills oo_unsignedIntAtIndex:i]) return [ratingNames oo_stringAtIndex:i];
}
return [ratingNames oo_stringAtIndex:shortestArray - 1];
}
return @"either names or kills have a zero length array";
Not sure if it'd compile, I might have mislaid a semicolon or two, plus I'm not too sure that the count method will return a number if you've got a null 'array'. You might have to check that both [ratingNames count] & [ratingKills count] return an actual number before knowing for sure that that piece of code won't crash & burn in absolutely all circumstances.