Jump to content

Niemand

Moderator
  • Posts

    2,138
  • Joined

  • Last visited

Everything posted by Niemand

  1. Quote: Does your code manage to find the resource fork as typically represented on a FAT drive? I think it uses a RESOURCE.FRK folder or something? The code I've written handles the format details inside the resource fork, and doesn't concern itself with where the fork data is stored. The proper storage mechanism should probably be apple double files. Quote: At present in my resource manager, an unload/reload would be required for resource overrides to take effect or vanish, so I'd have to unload all resources when stopping or exiting a scenario; however, a way to avoid that would be advisable. I think simply having some mechanism of marking where (ie which search path) the resource was found at would do the trick, and automatically unloading any resources found at the top search path when popping it from the stack. A stack-based approach could be a good solution; it's roughly what Apple's original Resource Manager does.
  2. Interesting! One suggestion that I would make is that if this is going to be put into use, the code for the game on both platforms should be checked over to make sure that 1) Designers can override all resources that would be interesting, useful, and sane to override, and 2) Overridden resources are properly unloaded again when they are no longer appropriate (like when the player loads a scenario that doesn't alter the appearance of the fields, after having played one which does). I'm guessing that simple implementation will mostly accomplish these on both platforms, but it's worth being thorough. Also, while I assume your plan is to use this new manager code to replace use of the system Resource Manager on Mac OS, would it be useful to you to have a portable implementation of code for reading old Macintosh resources, given that they were used in the past, and currently can't be read at all on Windows? It so happens that I've been working on just such a thing, and that as of today it seems to be fully able to read and write valid resource forks and resource maps. For this to be really useful it would still be necessary to write code to get data out of the old formats that will generally be used for resources, primarily PICT and snd, but for PICT, at least, my project was already going to require me to do such a thing, in at least a rudimentary way.
  3. Be careful applying this test; clever conspirators may subvert it by artificially lengthening the telomeres in the material used to generate the clone. This can cause the clone to have telomeres of about the same length as the original, making them difficult to distinguish, or longer, leading to incorrect conclusions about which is the original. This counter-measure has become more common recently due to the widespread use in commercial settings of basic techniques to detect clone infiltrators.
  4. The docs claim: Quote: When a party leaves a scenario. . . items that have special classes will have those classes be set to 0
  5. You could make an invisible character to follow the party around and watch them while the other character is a party member. It might be tricky to make sure that this didn't interfere in any other detectable way, though. (The invisible character would need to never get in the way of the party or visible NPCs.)
  6. Click to reveal.. Frank Pulver: Level 6 Demolitions Specialist STATISTICS: Strength - 3 Dexterity - 2 Coordination - 4 Intelligence - 2 Endurance - 4 SKILLS: Weapon (Needlegun) - 4 Weapon (Atom Blaster) - 4 Artifice - 2 Survival - 3 Armor - 4 Perception - 3 Knowledge (Explosives) - 4 ATTRIBUTES: Health - 34/34 Dodge - 8% Stamina - 9 Energy - 6 Speed - 4 Feat: Power Armor More armor skill, which will probably mark an end to my pouring skill points into that area. Also, another point of skill in what's supposed to be Pulver's specialty. I'm not particularly happy about having missed out on actually making any sort of use of that thus far (and then losing all of the toys I had stockpiled), so the next time Frank gets his hands on something explosive I intend to see to it that something gets blown up, even if it's only a laundry room.
  7. Quote: What if your self-employed? Aha! A secret cabal is stealing the ends of sentences! (It seems that they cleverly leave the final punctuation behind, though, to camouflage their activities.)
  8. Okay then. Strange that that would have been it; my test file was saved from TextEdit, and while the program shouldn't have been particularly sensitive to line endings, my implicit assumption was that they would be in the Unix/Modern Mac OS style.
  9. Huh. That's pretty weird. Possibly it's having issues with properly reading the header line? Actually I don't think that even that would do it. Does the problem kick in after a certain row or number of rows? If it still does the wrong thing with, say, the first to rows of data (headers and one actual entry), it would probably be easiest for me to debug it myself, if you didn't mind sending me that subset of the data (which could be obfuscated in any way you see fit as long as the obfuscated data still fails to be properly reordered). (My email's niemandcw@gmail.com if you want to send anything that way.) This particular failure mode is really bizarre, since in order for a cell to be printed back out the program has to have read the cell, decided that it knew which column the cell belonged in, and put it there.
  10. Glad it worked, Slarty. Unfortunately, the point when you picked up and started trying to make it work was five minutes after I went off to a meeting, but luckily Dinti was on his toes. I wish I hadn't been so stupid as to edit out the sentence originally in my post that said it was C++, since that would have removed one source of confusion. Also, some sort of usage instructions might have been a good idea. Anyway, I was really expecting that this would need more tweaking than just setting those character constants, so I'm happy that it actually got the job done.
  11. So the problem is you have something that looks like: Code: | CREATE | FOO | ID | BAR || CREATE: A | ID: 7 | | FOO: y || CREATE: B | BAR: ? | FOO: g | ID: 12 | and you want to turn it into Code: | CREATE | FOO | ID | BAR || CREATE: A | FOO: y | ID: 7 | || CREATE: B | FOO: g | ID: 12 | BAR: ? | The task is involved enough that I can't imagine any way to do it without at least a little bit of programming to describe it, although I wouldn't call that nearly as bad as doing the job by hand, given you have more than a thousand rows and several columns. How is the data currently stored? Plain text? Delimited how? It seems like all that's required is: Code: Read first rowCreate an empty map/dictionaryFor each item in first row Add the (key,value) pair (item,index) to the mapWrite the first row back outFor each remaining row Create an array with length equal to the number of columns For each item on the row Look up the item's prefix in the map Assign the item to the indicated index in the array Write out the array as the new row I just couldn't resist, so in between other things this morning, I threw together something which can turn my first example table into the second. I suppose I could have written it in Python or something, so that a compiler isn't needed, but that would have taken a lot longer. Click to reveal.. Code: #include <iostream>#include <iomanip>#include <algorithm>#include <map>#include <string>#include <vector>#include <sstream>std::string trim(std::string s,const std::string& whitespace=" \t\n\r"){ s=s.erase(s.find_last_not_of(whitespace)+1); return(s.erase(0,s.find_first_not_of(whitespace)));}struct center{ const std::string& str; unsigned int width; center(const std::string& s, unsigned int w): str(s),width(w){}};std::ostream& operator <<(std::ostream& os, const center& c){ unsigned int padBefore=std::max(((int)c.width-(int)c.str.size())/2,0); unsigned int padAfter=std::max((int)c.width-(int)padBefore-(int)c.str.size(),0); os << std::string(padBefore,' ') << c.str << std::string(padAfter,' '); return(os);}#ifdef __CLING__void fix_table(){#elseint main(){#endif const char delim='|'; const char prefixMark=':'; std::string line, item; std::map<std::string,unsigned int> labels; std::vector<unsigned int> widths; //examine the header line getline(std::cin,line); std::istringstream ss(line); while(getline(ss,item,delim)){ unsigned int width = item.size(); if((item = trim(item)).empty()) continue; labels.insert(std::make_pair(item,labels.size())); widths.push_back(width); std::cout << delim << center(item,widths.back()); } std::cout << delim << std::endl; //sort each record line while(getline(std::cin,line)){ ss.clear(); ss.str(line); std::vector<std::string> newline(labels.size()); //read each entry and put it into place in the array while(getline(ss,item,delim)){ if((item=trim(item)).empty()) continue; size_t prefixEnd=item.find(prefixMark); if(prefixEnd==std::string::npos) continue; //drop items without prefixes std::map<std::string,unsigned int>::const_iterator it=labels.find(item.substr(0,prefixEnd)); if(it==labels.end()) continue; //drop items with unknown prefixes newline[it->second]=item; } //print the sorted array for(unsigned int i=0; i<newline.size(); i++) std::cout << delim << center(newline[i],widths[i]); std::cout << delim << std::endl; } #ifndef __CLING__ return(0); #endif}
  12. Quote: until Niemand can make a program that automates the process Geez, guys, I already did this, and you keep acting as though the problem weren't entirely solved. As noted by others, the main problem is that doing the job well requires a lot of effort, on timescales that range to more than a year. Given that it's only a hobby, it's hard for a lot of us to keep working on things for that long. So, the decision was reached that it would be better to have a supply of short, high quality scenarios than none at all.
  13. Quote: There's no way I'm going to start reading Schlock Mercenary; it's nearly as long as Sluggy Freelance. I find this reaction crazy. It would be one thing to say 'I'm busy right now, and I don't have the time to sit down and read a good story', but (at least the way I interpret statements like yours) 'I hear that story is good, but no way am I going to read something that I might spend a long time enjoying' is quite another. If a story is good, why would you possibly want there to only be a little of it? Large comic archives are great, because you can read them as fast as you want, without having to wait for updates. Furthermore, if you had some sort of 'willpower' type of capability, you could actually take a break from reading them.
  14. Originally Posted By: Lilith Originally Posted By: Niemand your advisor My what? Does everyone have, like, their own personal course advisor over there? Because over here there was pretty much one per faculty. For undergrads, the system I've seen is that some fraction of the professors agree to be advisors, and get assigned a number of students to take care of. This doesn't entail all that much work, since each student meets with his or her advisor about once per semester to get approval for the classes they plan to sign up for, and get any questions answered. So, each student has an advisor, who is not the same person as most other students' advisors, but who is still shared with a number of other students. (While I really only have one data point on this, only having attended one school as an undergrad, it's been my understanding that this is at least a reasonably common arrangement.) When done properly students are paired with an advisor in a relevant department, and the advisor is able to able to maintain at least a vague recollection of each student. As noted before, however, I've seen this fail, with frustrating results for the students in question. EDIT: Quote: I can't speak for graduates, but I've always been under the impression that a college has a few basic requirements that you have to either take or get credit (from AP classes or just testing out). Most commonly, these requirements include foreign language, math, and a few other things, depending on the place. One sibling of mine has a physical education (of sorts) requirement. I was referring there to requirements for individual classes, rather than for completion of a degree as a whole.
  15. That is just insane. My experience at universities in the U.S. is that graduates and undergraduates just take whatever courses are interesting or appropriate; no one enforces arbitrary limitations on entry (or exit, in your case?). The idea is that you're supposed to make deliberate decisions about what classes you can handle which will help you complete your degree, and that your advisor is supposed to be available to help with this. (I've had good and helpful advisors, although I've heard stories from people who had useless ones.)
  16. Originally Posted By: Student of Trinity So a Bachelor of Arts in physics would probably mean that you had abandoned your B.Sc. after year three. Or that your school has made an arbitrary decision that it will only grant B.A. degrees. At the school I went to for undergrad, there were originally physics programs in both the College of Arts and Sciences and the College of Engineering, which were actually identical except for the detail of the two schools' distribution requirements. The engineering school gave graduates a Bachelor of Sciences, while the school of arts and sciences gave a Bachelor of Arts. The engineering program was phased out a few years ago anyway, partially because it was totally redundant, and partially (at least the students suspected) because the school of arts and sciences didn't like students escaping its more thorough distribution requirements. From what I've seen, in the U.S., there's nothing meaningfully different (or no useful conclusion the observer can draw) about differing types of Bachelor's degrees, in the hard sciences at least. EDIT: Missed reading Nikki's post the first time. Congratulations!
  17. Hey, he fixed it once already! Just because he broke it again, you want him to fix it again?
  18. You know, now that you mention it, I remember having similar problems with manipulating stats for the identification scrolls in BoR. If I boosted the character's Intelligence or Arcane Lore too high, it wouldn't go back down again. I eventually settled on always boosting to 60, rather than the +100 or some such that I had originally used. Unfortunately, I don't think I have any notes from my session of debugging it with Nikki, since we were using KoL chat to communicate.
  19. I need to get my minor finished up, so I'll be pretending to be a computer science student this semester: COMP SCI 520 : Intro to Theory of Computing COMP SCI 536 : Intro-Progm Langs & Compilers COMP SCI 726 : Nonlinear Optimization I I was going to take a set of classes entirely about numerical methods, on the grounds that I really could benefit from that for the type of work I do, but thanks to schedule conflicts I'm getting to instead take classes that have no particular justification in terms of usefulness, but which I've wished I had an excuse to take (primarily the languages and compilers course).
  20. I realized that I had a large backlog of pictures to share that I hadn't gotten around to uploading. Unfortunately, I managed to do something stupid with FUSE which crashed my Finder and renders my /Volumes/ a deadly trap for stat(), so getting them uploaded was a bit more troublesome than usual. I got it done, but when I discovered that I had exported them full size, I just couldn't bring myself to do it over again to shrink them down. So here they are in gigantic form: Ducklings We had an exceedingly vivid rainbow just between a rainstorm and sunset about a week ago: 1 2 3 4 Here's one of those accidental pictures, the kind that are usually of the inside of a pocket, except that this one ended up being rather pretty, I think: Surreal The setup I ended up with during out last Hobopolis Hamster run: Lots of Computers My cat, Shadow, again: 1 2 My brother's cat, resting on top of a luxury skytrain An assault perambulator A base with two sides, and two commanding officers (Captain Minotaur, and The Witch King). One prefers gardens, and keeps a deadly pet viper, while the other likes gloomy red and black battlements with spikes: 1 2 3 The aftermath of a battle. Demon 888, Darth Thnumitz, and the Scourge Knight can be seen cowering behind a stone tank in the foreground.
  21. You can have up to 20 of each. Also, take a look over on the Blades Forge; I got a few useful scripts to the point where I think that they're ready, so I put them up there.
  22. While we're here: Is there a reason the display does such terrible things to the indentation? It seems to use a very narrow tab width, which I don't care for but can deal with, however all lines indented by more than one level end up being displayed as though indented by only one level. Glancing at the source, it looks like if a line is indented at all a single non-breaking space is inserted, which ends up being visible, and then the raw whitespace is included, but from what I recall of HTML rules this is being correctly collapsed down/ignored when displayed. Would this be overly hard to do something about?
  23. Item ability 204: Restores 5 points spell energy for each level of [item ability] strength. This is usually used by items which consume a charge when used, but as far as I know it's perfectly applicable to lasting items, since this is basically what the Eye of Khoth in The Za-Khazi Run does.
  24. Right, but it will be local to a scenario. There should be no problem making duplicates of Pachtar's Plate, the Fury Crossbow, Black Halbard, and Ring of Endless Magery which the party can carry from scenario to scenario.
  25. Of course they can, in general, simply be replicated (with the exception of the Knowledge Brew recipe).
×
×
  • Create New...