<2022-05-24T05:54:13.000Z> Curvin: Yo
<2022-05-24T05:54:24.000Z> Curvin: You said you can teach people how to code?
<2022-05-24T05:56:07.000Z> Curvin: I need your help.
<2022-05-24T05:58:47.000Z> Curvin: I'll be back in 5 hours hold up
<2022-05-24T06:11:46.000Z> AmericanChampion: Yeah I gotchu bro
<2022-05-24T06:11:51.000Z> AmericanChampion: What are you working on?
<2022-05-24T11:28:29.000Z> Curvin: I want to create a sort of software...
<2022-05-24T11:28:44.000Z> Curvin: I have a weird idea
<2022-05-24T11:30:00.000Z> Curvin: Basically, I want to develop a "gaming tool" to combine turn-based strategy combat, both grand scale and on the minuscule scale, into a traditional game
<2022-05-24T11:32:33.000Z> Curvin: To do that though
<2022-05-24T11:32:57.000Z> Curvin: I need a superior power of autism
<2022-05-24T11:34:03.000Z> Curvin: to teach me the 101 of coding i guess
<2022-05-24T11:57:53.000Z> AmericanChampion: Oh, I'd been thinking of that for the /quest/.
<2022-05-24T11:58:06.000Z> AmericanChampion: What language are you aiming for? 
<2022-05-24T11:59:06.000Z> Curvin: You tell me I'm fucking luddite
<2022-05-24T11:59:59.000Z> Curvin: Uhhh
<2022-05-24T12:00:24.000Z> AmericanChampion: What sort of things would you like it to be able to do, and where? My guess is the idea is to essentially make a grand strategy game, but where the 'player' role is filled by the DM.
<2022-05-24T12:02:06.000Z> AmericanChampion: Is that right? An MS paint sketch of what you'd want the final interface to resemble would give me a better idea.
<2022-05-24T12:03:41.000Z> Curvin: Well, sort of, it is supposed to be like Chess but much more complicated, nornally we have to decide the outcomes of things with dice rolls, but there are many set values that also influence what happens, so I'm going to need something that can calculate and account for all those values.
<2022-05-24T12:05:43.000Z> AmericanChampion: Oh, wait, you're looking to build a tool for an existing system, then? That's much easier.
<2022-05-24T12:05:55.000Z> Curvin: Yep
<2022-05-24T12:06:06.000Z> AmericanChampion: What's the system, and what parts do you want to automate?
<2022-05-24T12:06:42.000Z> Curvin: They system our game is based on is GURPS
<2022-05-24T12:07:34.000Z> Curvin: Of course, we add our own flavour of WW2, that means we gotta account for many, many values, even in the smaller scale battles between individual characters
<2022-05-24T12:08:06.000Z> Curvin: Be it the character's own skill, the weapon they're using, effective range, terrain bonuses/debuffs and so on
<2022-05-24T12:08:13.000Z> AmericanChampion: Alright, do you have the transcript for a battle? It'd give me an idea of what you'd want to automate to smooth the process.
<2022-05-24T12:10:19.000Z> Curvin: You could definitely start looking for the older Shadows over Hellas threads, that way you can probably get an idea, my own game that's essentially a fanfiction works upon a personal interpretation of the rules from a player's perspective, since all Tactical has is solid paper
<2022-05-24T12:12:08.000Z> AmericanChampion: So, sort of like the turn-based strategy elements from the quest. You'd want a grid, the ability to design, place, and save characters, and the ability to set tiles as passable or impassable.
<2022-05-24T12:12:20.000Z> AmericanChampion: I think I understand now. Yes, that should be pretty feasible.
<2022-05-24T12:12:45.000Z> Curvin: Yeeeeees
<2022-05-24T12:14:52.000Z> AmericanChampion: So, the fundamental component here would be a character class (not the /tg/ kind of class). Characters would have abilities that work like functions, and can be applied to targets.
<2022-05-24T12:15:04.000Z> AmericanChampion: They'd also have stats.
<2022-05-24T12:15:38.000Z> AmericanChampion: Let me draw a mockup of a character class, you can tell me whether it looks right.
<2022-05-24T12:17:02.000Z> Curvin: I know little about the system myself, that's why for this project I will have to work closely with Tactical and some more people to decide on things
<2022-05-24T12:19:57.000Z> Curvin: It should be much easier than just calculating everything with your brain though
<2022-05-24T12:21:36.000Z> AmericanChampion: {	name: "Rifle Chad",	stats: {		health: 14,		str: 11,		int: 10,		agi: 9,		riflery: 12,		melee: 9	},	abilities: [		{			name: "Rapid shot",			behavior: function (self, target) { target.health -= ceil(self.riflery / 3d6)			}		},		{			name: "Aimed shot",			behavior: function (self, target) { target.health -= ceil(self.riflery + min(self.str/2, self.int/2) / 3d6)			}		},		{			name: "Stabilize",			behavior: function (self, target) {				if (target.health < target.maxHealth / 3) { target.health = min(target.health+target.maxHealth/3, target.maxHealth/3) 				}			}		}	]}
<2022-05-24T12:21:49.000Z> AmericanChampion: Does this look like a vaguely correct character representation?
<2022-05-24T12:22:09.000Z> AmericanChampion: Abilities would be stored separately, the list would just have pointers to them.
<2022-05-24T12:23:14.000Z> Curvin: Our characters rather have more passive abilities instead of active ones I think, what the character does in combat we can just write in
<2022-05-24T12:23:34.000Z> Curvin: But so far it looks like how I remember it
<2022-05-24T12:24:09.000Z> AmericanChampion: Give me some examples of passive abilities
<2022-05-24T12:25:27.000Z> Curvin: A while back we gave one of our characters the ability to boost a certain character's attributes (Respectively "Heart", Strength, IQ and Dexterity) b 2
<2022-05-24T12:25:50.000Z> Curvin: if the character is within a 30m radius
<2022-05-24T12:26:02.000Z> AmericanChampion: Alright, I think I can see how that would work.
<2022-05-24T12:26:41.000Z> Curvin: AOE buffs shouldn't be too hard to code in
<2022-05-24T12:27:23.000Z> AmericanChampion: Yeah, shouldn't be an issue. Just trying to get the structure of it down first so that the rest of the process is smoother.
<2022-05-24T12:27:41.000Z> Curvin: Yeah,
<2022-05-24T12:28:50.000Z> Curvin: I could contact Tactical about the details of the system, I did try once before but he probably didn't have the patience to write down what was in those books
<2022-05-24T12:32:57.000Z> AmericanChampion: ability_list = [	{		name: "Rapid shot",		behavior: function (self, target) { target.health -= ceil(self.riflery / 3d6)		}	},	{		name: "Aimed shot",		behavior: function (self, target) { target.health -= ceil(self.riflery + min(self.str/2, self.int/2) / 3d6)		}	},	{		name: "Stabilize",		behavior: function (self, target) {			if (target.health < target.maxHealth / 3) { target.health = min(target.health+target.maxHealth/3, target.maxHealth/3) 			}		}	},	{			name: "Spotter",			onUnitMoves: function (self, unit) {				if (unit.name == "Sniper Chad") {					if (distance(unit, self) < 30) {						applyEffect(unit, "Has Spotter")					} else {						removeEffect(unit, "Has Spotter")					}				}			}		}];effect_list = [	{		name: "Has Spotter",		on_apply: function (unit) {			target.bonus.riflery += 2		},		on_remove: function (unit) {			target.bonus.riflery -= 2		}	}];{	name: "Rifle Chad",	stats: {		health: 14,		str: 11,		int: 10,		agi: 9,		riflery: 12,		melee: 9	},	abilities: ["Rapid shot", "Aimed shot", "Stabilize","Spotter"]}
<2022-05-24T12:33:20.000Z> AmericanChampion: Something like this? Ability and effect lists are global, and units have lists of abilities.
<2022-05-24T12:33:59.000Z> AmericanChampion: If a unit's ability has an onUnitMoves function, then a hook is called whenever any unit moves, and the function under that key is run.
<2022-05-24T12:34:45.000Z> Curvin: I don't really know what that means but it sounds... solid
<2022-05-24T12:35:39.000Z> AmericanChampion: I'm using Javascript for these representations, by the way. It's the language that runs everything you interact with through web browsers, and lets you host things online very easily. You could put it up through Github or Bitbucket pages, and have the tool available on a free site, for example.
<2022-05-24T12:36:00.000Z> Curvin: Ooooh Javascript
<2022-05-24T12:36:30.000Z> Curvin: I remember some guy that asked me if I wanted to get into it for some reason... I never decided upon that offer.
<2022-05-24T12:37:08.000Z> Curvin: If this is what it takes I will learn Javascript then
<2022-05-24T12:37:17.000Z> AmericanChampion: JS is fun. Some programmers criticize it for being unprincipled, but it's a powerful language that runs on damn near anything. Probably the most useful language to know for anyone who's not a scientist or professional programmer.
<2022-05-24T12:38:02.000Z> Curvin: Cool? I am already a little nervous
<2022-05-24T12:38:11.000Z> AmericanChampion: No worries, JS is easy
<2022-05-24T12:38:50.000Z> AmericanChampion: It's the only language that will go out of its way to accommodate you even if you do something wrong. Doesn't even care if you leave out the semicolons it claims it wants.
<2022-05-24T12:39:42.000Z> Curvin: Like the computer will grow hands and pet me on the head if I make a mistake?
<2022-05-24T12:39:51.000Z> Curvin: lol jk
<2022-05-24T12:39:55.000Z> AmericanChampion: Close as Brandon Eich can make it.
<2022-05-24T12:41:04.000Z> Curvin: Cool cool
<2022-05-24T13:58:44.000Z> Curvin: So can you point me to some guides on how to Javascript,m,
<2022-05-24T14:09:26.000Z> Curvin: or maybe teach me yourself?
<2022-05-24T21:42:01.000Z> AmericanChampion: Sure. If you have a brief list of abilities, I can run you through a sort-of tutorial on creating a system for applying their effects.
<2022-05-24T21:43:17.000Z> AmericanChampion: (Abilities meaning passive and active character traits)
<2022-05-25T06:14:01.000Z> Curvin: Oh yeah suuuure but I reallly meant like teaching me the very basics of the language itself 
<2022-05-25T06:14:28.000Z> Curvin: Quite bold of you to assume I know virtually anything
<2022-05-25T06:19:17.000Z> AmericanChampion: IMO the best way is to learn by doing. Basically, plan out a basic application, and then go through it step by step. The tricky part as a beginner is the engineering; I'll handle that and walk you through the implementation.
<2022-05-25T06:20:50.000Z> AmericanChampion: A quick sketch of an interface in MS Paint and a list of abilities that characters should be able to have would let me draw up a clean design, which will make everything a lot easier - especially expanding it and adding features later, since you'll have a solid base.
<2022-05-25T06:21:04.000Z> Curvin attached file https://i.poastcdn.org/095189f93df9d326ccfe0491e24b0c3b5131534d8ffef6f082b3b74e9231b5d3.mp4
<2022-05-25T06:21:27.000Z> AmericanChampion: mouse
<2022-05-25T06:22:53.000Z> Curvin: I guess I will look at sone tutorials and figure it out?
<2022-05-25T06:24:09.000Z> AmericanChampion: If you want a basic introductory task, I can give you something very simple.
<2022-05-25T06:24:27.000Z> AmericanChampion: A minute, I'll plan something out.
<2022-05-25T06:41:55.000Z> Curvin: that's great but I have to attend school soon
<2022-05-25T06:42:06.000Z> AmericanChampion: No worries.
<2022-05-25T09:14:00.000Z> AmericanChampion: Alright, got an introduction for you. https://i.poastcdn.org/2d54bfc2c65d4efa4fd0b3a4d16f015bcf15e1e51102db01273a2efbd64956a6.PNG
<2022-05-25T09:14:44.000Z> AmericanChampion: pastebin.com/Ys5DZYD4
<2022-05-25T09:15:18.000Z> AmericanChampion: This is a link to a very basic version of what you want to implement. I've added a simple task to get you started - just writing a new ability and adding it to a partially-filled-out character.
<2022-05-25T09:15:44.000Z> AmericanChampion: The code's probably a bit intimidating, but I wrote it and you can ask me any any questions about it that you want.
<2022-05-25T09:16:15.000Z> AmericanChampion: The idea is that you can expand on this program to get started in the direction of the thing you actually want to create. 
<2022-05-25T09:16:56.000Z> AmericanChampion: To start, click download, name it <whatevernameyouwant>.html, and open it in any web browser to try it out.
<2022-05-25T09:17:56.000Z> AmericanChampion: Once you get a feel for how it works, open it in a text editor (I like notepad++ since it's free and has some useful features), and try to tweak parts of it to add features. If you have trouble with something, just ask.
<2022-05-25T11:29:36.000Z> Curvin attached file https://i.poastcdn.org/7dd0bd372e4e1d4be9e298a29f6d383a5aa50f9bfbfcc49e3bd1b4479bca45d6.gif
<2022-05-25T12:17:49.000Z> Curvin: Alright I know what I have to do, now to figure things out.
<2022-05-25T12:51:24.000Z> Curvin: I think I have made a critical mistake why is the textbox not displaying any options
<2022-05-25T13:40:22.000Z> AmericanChampion: What's the screen look like? 
<2022-05-25T13:41:05.000Z> AmericanChampion: Also pro tip you can hit ctrl+shift+i to open the inspect sidebar. Click console there, and you'll be able to see any error messages.
<2022-05-25T14:34:46.000Z> Curvin: :O
<2022-05-25T18:04:37.000Z> Curvin: Ok I figured out what I did wrong
<2022-05-25T18:05:03.000Z> Curvin: I fucked up entirely and wrote something that gave me an unexpected token exception
<2022-05-25T18:09:38.000Z> Curvin: But it doesn't tell me what I really did wrong???
<2022-05-25T18:14:09.000Z> Curvin: I think I might just have made my first typo, boy isn't this fun
<2022-05-25T18:39:14.000Z> AmericanChampion: What's the error message look like, and what does your code look in that area?
<2022-05-25T19:19:51.000Z> Curvin: I can't tell and neither the console wants to.
<2022-05-25T19:44:15.000Z> AmericanChampion: Post a screenshot of the console, and your code changes, I'll show you how to debug it.
<2022-05-25T19:46:35.000Z> Curvin attached file https://i.poastcdn.org/6e3514a8ded108914917170dd1d46b3f9db554cfbdfd727aa310ad3af162057c.png
<2022-05-25T19:55:23.000Z> Curvin: So?
<2022-05-25T20:26:13.000Z> AmericanChampion: That's everything but the code. What parts of the script block did you change?
<2022-05-25T20:31:08.000Z> Curvin: Well I gave the Rogue character it's stats, and I tried to implement the Poison move like you told me to.
<2022-05-25T21:00:55.000Z> AmericanChampion: Alright, screenshot those parts of the code, and I'll take a look.
<2022-05-25T21:01:13.000Z> AmericanChampion: Also, the error message you got says that the issue is on line 120 of your code. 
<2022-05-25T21:02:05.000Z> AmericanChampion: Reading error message and stack traces is pretty much vital when programming.
<2022-05-25T21:02:37.000Z> Curvin: >it did tell me where the error was
<2022-05-25T21:02:43.000Z> Curvin: I feel insanely dumb now
<2022-05-25T21:04:15.000Z> Curvin: I'll look at it tomorrow it is late
<2022-05-26T04:39:37.000Z> Curvin: Right, so I got to work, again, and I reaaaaaaaally messed up much more than I believed, typos fucking everywhere, and now an "unexpected string"
<2022-05-26T04:42:20.000Z> Curvin: Now can you tell me what is wrong with this fucking string
<2022-05-26T04:42:21.000Z> Curvin: "Poisoned": {            'on_turn_change':               damage = (self.stat('int') - 5 - dice(1,6)) * 2;
<2022-05-26T06:02:27.000Z> AmericanChampion: You didn't declare a function as a value for 'on_turn_change'.
<2022-05-26T06:02:46.000Z> Curvin: Oh.
<2022-05-26T06:03:11.000Z> AmericanChampion: Objects enclosed by "{}" are dictionaries that map keys (numbers or strings(text)) to values (any type of data).
<2022-05-26T06:04:28.000Z> AmericanChampion: Functions are a type of data, so certain keys have functions as values. That way, we can have an object that calls a special kind of function that depends on what object it is, which is useful for creating custom RPG attacks that might not follow the same structure between different attacks.
<2022-05-26T06:10:48.000Z> Curvin: omfg why can't I do anything right
<2022-05-26T06:12:07.000Z> Curvin: the weird part is the error points at the word "Poisoned" for some fucking reason as the "unexpected string"
<2022-05-26T06:18:02.000Z> Curvin: I believe the problem is I should be tought to write my own code
<2022-05-26T06:23:23.000Z> Curvin: Something that I can understand myself
<2022-05-26T06:59:57.000Z> AmericanChampion: Alright, what kind of thing would you like to learn how to make?
<2022-05-26T07:01:06.000Z> AmericanChampion: The ultimate goal is to make a TTRPG helper program, right?
<2022-05-26T07:01:18.000Z> Curvin: let's try a button that makes a stupid noise since I am already on the verge of losing my shit
<2022-05-26T07:01:35.000Z> AmericanChampion: Alright, that works.
<2022-05-26T07:02:10.000Z> AmericanChampion: So, start by making a new file. Same structure as the original, but with nothing in the script section.
<2022-05-26T07:03:13.000Z> Curvin: you know when I make a new file it is COMPLETELY empty right?
<2022-05-26T07:03:37.000Z> AmericanChampion: Yeah, copy and paste the original file's contents, and delete the stuff inside the script blocks.
<2022-05-26T07:05:04.000Z> Curvin: whatevs, I tried to follow some sort of yt tutorial and couldn't make any sense of it so yeah I do got a file ready to write on I guess.
<2022-05-26T07:05:15.000Z> Curvin: it looks like this https://i.poastcdn.org/14b2ef2c13a6bc2ad7af37f41c45cbea0e06b75e9afede469ce678d5326b1465.png
<2022-05-26T07:05:26.000Z> Curvin: oh my fucking god
<2022-05-26T07:05:32.000Z> AmericanChampion: ?
<2022-05-26T07:05:33.000Z> Curvin: how did i LEAVE THAT FUCKING Z IN THERE
<2022-05-26T07:05:38.000Z> AmericanChampion: Z
<2022-05-26T07:05:56.000Z> Curvin: I'm sorry I can't do anything right
<2022-05-26T07:06:00.000Z> AmericanChampion: No worries.
<2022-05-26T07:06:18.000Z> AmericanChampion: Add a button in the body section. <button></button>
<2022-05-26T07:06:31.000Z> AmericanChampion: Give it an id, like I gave the elements in my tutorial.
<2022-05-26T07:07:23.000Z> AmericanChampion: Towards the bottom of my tutorial, I use document.getelementbyid to obtain pointers to elements in the script seciton.
<2022-05-26T07:07:46.000Z> AmericanChampion: You can do that in this script section, and you'll have a button variable set. You can then print it with console.log.
<2022-05-26T07:08:07.000Z> AmericanChampion: (and it'll appear in the console)
<2022-05-26T07:08:17.000Z> AmericanChampion: Try that, see if it works.
<2022-05-26T07:13:49.000Z> Curvin: like... this? https://i.poastcdn.org/3822e0ed39eb1c38f6baeca92bbd60e0a728eaec88897a759c2da23c0a2384a9.png
<2022-05-26T07:14:04.000Z> AmericanChampion: Almost. <button id="">
<2022-05-26T07:14:29.000Z> AmericanChampion: console.log is a function that takes a variable, so you'd call it as console.log(varyouwanttoprint)
<2022-05-26T07:15:21.000Z> Curvin: I think I'm starting to get it... 
<2022-05-26T07:15:21.000Z> AmericanChampion: As an aside, you could also add onclick="functionname(event)" inside the button tag, which make it call a function, if you wanted to go that route instead.
<2022-05-26T07:16:22.000Z> Curvin: I mean aren't buttons meant to be pressed?
<2022-05-26T07:16:36.000Z> AmericanChampion: yee
<2022-05-26T07:16:47.000Z> Curvin: I'd try to implement that
<2022-05-26T07:17:31.000Z> AmericanChampion: Either way gets you there. If you grab the element in the script, you can set its onclick property the same way I set the textfield's onkeypress property.
<2022-05-26T07:19:50.000Z> Curvin: let's say I want to host a webpage with an image, and If I click the image in a precise point it makes a sound
<2022-05-26T07:20:13.000Z> AmericanChampion: Yeah, I think you can do that. One sec.
<2022-05-26T07:21:33.000Z> AmericanChampion: Yeah, just add an on click event to an image. Getting the right coordinates is a little tricky, but very possible.
<2022-05-26T07:22:18.000Z> AmericanChampion: chestysoft.com/imagefile/javascript/get-coordinates.asp
<2022-05-26T07:22:29.000Z> AmericanChampion: Here's a tutorial on getting the coordinates of a click on an image.
<2022-05-26T07:22:54.000Z> AmericanChampion: (You'll need to change red.gif to an image URL that actually exists, but should otherwise work out of the box.
<2022-05-26T07:23:46.000Z> AmericanChampion: document.getElementById('clickme').onclick = function clickEvent(e) {      // e = Mouse click event.      var rect = e.target.getBoundingClientRect();      var x = e.clientX - rect.left; //x position within the element.      var y = e.clientY - rect.top;  //y position within the element.      console.log("Left? : " + x + " ; Top? : " + y + ".");    }
<2022-05-26T07:23:55.000Z> AmericanChampion: The above is a better solution than that link. Much simpler.
<2022-05-26T07:26:06.000Z> Curvin: well, what do I do with this
<2022-05-26T07:26:30.000Z> AmericanChampion: 1. Insert an image into the document (that's just html)
<2022-05-26T07:26:48.000Z> AmericanChampion: 2. Add the onclick event to the image (as described earlier)
<2022-05-26T07:27:19.000Z> AmericanChampion: 3. Add the onclick function above (now clicking the image logs a message with the mouse coordinates)
<2022-05-26T07:28:22.000Z> Curvin: how am I supposed to put an image into a text file
<2022-05-26T07:28:58.000Z> Curvin: wait
<2022-05-26T07:29:05.000Z> Curvin: I'm supposed to put the url of the image?
<2022-05-26T07:29:19.000Z> AmericanChampion: Okay, so you know HTML, right?
<2022-05-26T07:29:55.000Z> Curvin: Absolutely the fuck not, now that I think about it that may be why I'm struggling so much...
<2022-05-26T07:31:10.000Z> AmericanChampion: Alright. HTML is basically how you create webpages (nowadays professionals use some complicated bullshit tools to make things like large corporate websites, but if you've ever seen Berkshire Hathaway's site, that's what you can make with HTML right off the bat).
<2022-05-26T07:31:50.000Z> Curvin: ya?
<2022-05-26T07:31:51.000Z> AmericanChampion: HTML is a markup language, not a programming language. Basically, you use it to create formatted documents rather than computer programs. If you've ever made a post on an old 2000's style forum, you have a little experience with it.
<2022-05-26T07:32:42.000Z> Curvin: I think I did do something like that... does Uncyclopedia count?
<2022-05-26T07:33:04.000Z> AmericanChampion: Probably. It have tags like this?<h1>Header message</h1>
<2022-05-26T07:33:38.000Z> AmericanChampion: In any case, here's a small html page with a header, some paragraph text, and some images. There's a <style> section, you can ignore it for our purposes.
<2022-05-26T07:33:47.000Z> AmericanChampion: w3schools.com/html/tryit.asp?filename=tryhtml_images_style
<2022-05-26T07:34:03.000Z> Curvin: well I remember full well having to do something similar, I used to write on the italian version of the site
<2022-05-26T07:35:43.000Z> Curvin: oh yeah, totally actually.
<2022-05-26T07:35:59.000Z> AmericanChampion: Here's a more comprehensive full HTML tutorial. I don't recommend reading the whole thing, but it has sections on everything in HTML: tutorialspoint.com/html/index.htm
<2022-05-26T07:36:18.000Z> AmericanChampion: Covers anything you'd need on that front and then some.
<2022-05-26T07:37:20.000Z> Curvin: I found one of the funniest things on the site how you can sandwich a word inbetween "[ ]" and the word in it would light up and link you to the page if you clicked on it, additionally you can also put "|" and put after it something completely unrelated
<2022-05-26T07:37:40.000Z> AmericanChampion: Right, sort of like that.
<2022-05-26T07:38:44.000Z> AmericanChampion: Anyways, if you want to make an image that you can click in a certain area to get a response, your first task would be to make a basic HTML file with an image. Give that a try, and paste the resulting code/screenshot here. 
<2022-05-26T07:38:59.000Z> AmericanChampion: Then I'll run you through getting the coordinates of clicking the image.
<2022-05-26T07:39:32.000Z> Curvin: Later, I have to go to school soon.
<2022-05-26T07:43:42.000Z> Curvin: I still can't believe you chose to help someone like ME to learn how to code.
<2022-05-26T07:45:23.000Z> Curvin: I don't think I can thank you nearly enough.
<2022-05-26T08:29:03.000Z> AmericanChampion: Hey, don't sweat it.
<2022-05-26T08:38:52.000Z> AmericanChampion: You mentioned you were working with tactical to design a system, I could help the two of you to engineer it (figure out the features/reqs you have to implement)
<2022-05-26T08:39:10.000Z> AmericanChampion: That's a lot of the difficulty behind building something like this, and having experience makes it a lot easier.
<2022-05-26T12:30:16.000Z> Curvin: I haven't really talked about him yet because I am still doing my crash courses.
<2022-05-26T15:11:34.000Z> Curvin: IT IS WORKING AS INTENDED; THE IMAGE IS PRESENT
<2022-05-26T15:11:36.000Z> Curvin: w3schools.com/html/tryit.asp?filename=tryhtml_images_style
<2022-05-26T15:11:57.000Z> Curvin: wait a minute
<2022-05-26T15:11:57.000Z> Curvin: fuck
<2022-05-26T15:13:05.000Z> Curvin: By now you can see what I am trying to do here. https://i.poastcdn.org/72b0786f1a34d44e08270f5c5744d1be3ef10ba1925b2839beba2e409ebf5152.png
<2022-05-26T15:14:19.000Z> Curvin: lol
<2022-05-26T15:19:49.000Z> Curvin: So now what I assume the next step is, moving the location of the button to the intended coordinates?
<2022-05-26T17:06:04.000Z> AmericanChampion: It's possible to move the button, but that isn't how you want to do what you're trying to do.
<2022-05-26T17:06:34.000Z> AmericanChampion: You have an image, you can add a click event to it, as discussed above.
<2022-05-26T17:06:43.000Z> AmericanChampion: The button is extraneous.
<2022-05-26T17:07:31.000Z> AmericanChampion: (getting the set of coordinates that comprises the body of the cow is another thing entirely, but I'll assume you just want to have it work for a circle in the general area of the cow for now).
<2022-05-26T17:07:50.000Z> AmericanChampion: So, basically: 
<2022-05-26T17:07:55.000Z> AmericanChampion: Add click event to image
<2022-05-26T17:08:04.000Z> AmericanChampion: Get coordinates of click event relative to image
<2022-05-26T17:09:12.000Z> AmericanChampion: Check if coordinates are near where you want them to be (I'd suggest using the distance formula, a center that you happen to like, and a radius - maybe have them correspond to the large brown spot on the cow's back)
<2022-05-26T17:10:26.000Z> AmericanChampion: To get the coordinates and radius you want to hard-code in as manually set variables, just get it to print the coordinates to console when you click, then click in the center of the target area to get the center coordinates, and then the edge to be able to figure out the radius.
<2022-05-26T17:16:10.000Z> Curvin: alright alright alright how would I do all that
<2022-05-26T17:18:37.000Z> AmericanChampion: Step by step. First, add a click event to the image, and print the event when it fires.
<2022-05-26T17:28:42.000Z> Curvin: I'm struggling on this.
<2022-05-26T17:29:18.000Z> AmericanChampion: Alright - part of programming is working through a problem with the help of search engines.
<2022-05-26T17:29:33.000Z> AmericanChampion: They've gotten a lot worse since 2018, but they still work for the beginner stuff.
<2022-05-26T17:29:57.000Z> Curvin: that's reassuring lmfao
<2022-05-26T17:30:21.000Z> AmericanChampion: "add click event to image js" should get you something that works.
<2022-05-26T17:30:53.000Z> AmericanChampion: Integrate it with what you have, and you should have a function that fires when you click an image.
<2022-05-26T17:31:14.000Z> AmericanChampion: Have it print something - ideally the event - and you've got the first part.
<2022-05-26T17:44:41.000Z> Curvin attached file https://i.poastcdn.org/16ff86e9bf772d5c8920106130c5b87cbe427a1e745b6271b4427b14d18d69dc.jpg
<2022-05-26T17:44:58.000Z> Curvin: I thought I had it figured out.
<2022-05-26T17:55:31.000Z> Curvin: I am getting a headache, I think I will leave it likr this right now, surely I will find how to wrap my head around it in the next session
<2022-05-28T10:56:50.000Z> Curvin: alright, I think I figured it out, I can just make a image map with HTML, and make the image clickable.
<2022-05-28T10:59:57.000Z> Curvin: Now I have to find a way to code in a function to make it play a sound when I do that.
<2022-05-28T11:01:02.000Z> Curvin: How'd I do? https://i.poastcdn.org/ce0c7e2030de08030871adb8dd6fa870ebf23eba1db89b795a76d40896017077.png
<2022-05-28T18:29:48.000Z> AmericanChampion: A few issues.
<2022-05-28T18:30:08.000Z> AmericanChampion: First off, you're not using the map you instantiated. 
<2022-05-28T18:30:47.000Z> Curvin: Oh so that's why it wouldn't actually click
<2022-05-28T18:30:59.000Z> Curvin: Oh well it's just a typo.
<2022-05-28T18:31:25.000Z> Curvin: It's weird though, the resources do
<2022-05-28T18:31:43.000Z> AmericanChampion: document.getElementById("cow"), as the name suggests, gets the element whose ID is cow. I've never seen <img.id="cow"> as its own block before, so I'm not sure whether that syntax works, but even so, it'd get you the image, not the map, if it did.
<2022-05-28T18:32:16.000Z> Curvin: Oh well I didn't really know how to use that. Atleast until now.
<2022-05-28T18:33:28.000Z> Curvin: Thought it was something wrong with the map's name, the resources tell me to put a hashtag when I do usemap
<2022-05-28T18:34:57.000Z> Curvin: Nothing that a little more studying can't fix
<2022-05-28T18:35:25.000Z> AmericanChampion: If you set up an onclick event associated with the imagemap (stackoverflow.com/questions/29921696/can-i-have-an-onclick-event-on-a-imagemap-area-element/46589194, obtained from "imagemap onclick" in a search engine), it should work.
<2022-06-03T15:46:32.000Z> Curvin: Hey
<2022-06-03T15:46:39.000Z> Curvin: You still there?
<2022-06-03T15:47:42.000Z> Curvin: Aeons ago you mentioned that most projects use multiple files with code in them packed insidea folder, how would that work?
<2022-06-03T22:55:18.000Z> AmericanChampion: Oh, just have a script block that points to each of the files you want to include.
<2022-06-03T22:55:50.000Z> AmericanChampion: Same way you'd import a library being hosted online, but for a file on the same machine as the HTML page.
<2022-06-04T08:54:37.000Z> AmericanChampion: Any cool projects yet?
<2022-06-04T10:01:13.000Z> Curvin: I have been trying to make a sort of main menu gor the thing but I can't even do that apparently
<2022-06-04T10:03:26.000Z> Curvin: I have been studying CSS aswell now, trying to figure things out, I come out of a hole and into another one
<2022-06-04T10:05:31.000Z> Curvin: thank fuck for Tryit
<2022-06-04T10:07:01.000Z> Curvin: Anyway
<2022-06-04T10:07:30.000Z> Curvin: I am losing my shit over trying to make a music file play over the menu I am testing.
<2022-06-04T11:00:43.000Z> AmericanChampion: As an alternative to tryit, you can just create a file, edit it, and refresh the page. A little faster, and somewhat more customizeable.
<2022-06-04T11:01:12.000Z> AmericanChampion: For the music file, are you trying to add background music to a webpage? If you send a screenshot I can get a better idea.
<2022-06-04T11:40:26.000Z> Curvin: Well, yeah, menu music ofc, I tried doing as certain guides told me to on how to handle sound files but it seems I'm either too retarded or something's wrong
<2022-06-04T11:52:16.000Z> AmericanChampion: My first search turned up this:
<2022-06-04T11:52:39.000Z> AmericanChampion: embed loop="true" src="sound.wav" hidden="true" type="video/quicktime"  /embed 
<2022-06-04T11:52:57.000Z> AmericanChampion: With <> around /embed and the first part.
<2022-06-04T11:53:01.000Z> AmericanChampion: stackoverflow.com/questions/6529645/how-to-add-background-music-to-a-web-page
<2022-06-04T13:03:50.000Z> Curvin: this supposed to work with a URL??
<2022-06-04T13:11:47.000Z> Curvin: Either way it doesn't work for no reason whatsoever
<2022-06-05T01:37:08.000Z> AmericanChampion: Try the <object> solution
<2022-06-10T05:56:31.000Z> Curvin: SO many great ideas for content, but none of the skills required to DO THEM
<2022-06-10T09:26:28.000Z> AmericanChampion: Pick the simplest one, I'll guide the way.
<2022-06-10T12:35:45.000Z> Curvin: laaaaaaaaaaaater I have shit to do
<2022-07-07T20:24:15.000Z> Curvin: BRO
<2022-07-07T20:24:39.000Z> Curvin: I FIGURED IT OUT, HOW TO BECOME REAL PROGRAMMER 1337 HAXXOR
<2022-07-07T20:25:17.000Z> Curvin: ALL I HAVE TO DO IS JUST STEAL OTHER PEOPLE'S CODE FROM THE INTERNET LIKE EVERYONE ELSE DOES
<2022-07-07T20:25:36.000Z> Curvin: HOW COME I DIDN'T FIGURE THIS OUT SOONER
<2022-07-08T01:05:15.000Z> AmericanChampion: That's how H1Bs maintain their jobs. 
<2022-07-08T01:05:55.000Z> AmericanChampion: Doesn't work for building new things, but does provide a pretty stable baseline that will let you do most routine tasks fairly easily.
<2022-07-08T07:41:05.000Z> Curvin: oh